# how to check impedances on GANGLION in MATLAB?

I need check the impedances in MATLAB, but i can't find the function in MATLAB.

This is my little MATLAB code for get data, and i need check the impedance first.

Thank you!!!

I need check the impedances in MATLAB, but i can't find the function in MATLAB.

This is my little MATLAB code for get data, and i need check the impedance first.

Thank you!!!

## Comments

Hi Matejada,

There is NO direct function in Brainflow to 'automatically' do all the steps to obtain the Ganglion impedance values. My suggestion would be to look at the GUI source code that does this, and attempt to replicate what it is doing.

https://github.com/OpenBCI/OpenBCI_GUI/blob/master/OpenBCI_GUI/W_GanglionImpedance.pde

Regards, William

Hi William,

Yes, I tried to replicate the code, the problem is that the new_data variable returns zeros in the rows using the function

board_shim.get_current_board_data(1000, preset);

I also used the function to get the values of the resistance channels:

board_shim.get_resistance_channels(int32(BoardIds.GANGLION_BOARD),preset)

this variable returns a vector of 5 values.

I think that these values should be related to the values provided by the new_data variable, but I do not receive valid values.

Thank you friend!

Your replication of the code then likely has issues. Are you sending the command to the Ganglion that tells it to enter impedance mode?

https://docs.openbci.com/Ganglion/GanglionSDK/#leadoff-impedance

If you do think you are sending the command, it is possible you are sending it the wrong way. Other threads here on the forum show how to tell Brainflow to send a raw SDK command string.

Sorry, I'm new to the ganglion board, I didn't know about the different modes.

I will try to send a raw SDK, I don't know how to do it, but thank you very much for the information.