nigelrogasch / MAGIC

Magnetic stimulator interface controller toolbox
23 stars 9 forks source link

Dimensions of arrays being concatenated are not consistent. #6

Closed MarMykland closed 1 year ago

MarMykland commented 5 years ago

Hi, when trying to control magventure magpro I get this error seting up IPI or MODE i.e. Do you have any suggestions for a fix?

Error using vertcat Dimensions of arrays being concatenated are not consistent.

Error in magventure/setIPI (line 1386) commandBytes = [commandID;setVal;model;mode;currentDir;waveform;burstPulseIndex;ipi_M;ipi_L;...

Error in MF5ppTMStest (line 29) myMV.setIPI(2,'Normal',2,1.5,0);

myMV.setIPI(2,'Normal',2,1.5,0);

MarMykland commented 5 years ago

It seems to work by adjusting to the before april 3th version, but no matter how I tweak I get everything to work exept changing mode. Even if I use the before april 3th version I get it to work if I manually set it to twin mode, but if it is in standard mode I get this error for setIPI even though setIPI work if I am in twin mode manually.

Dot indexing is not supported for variables of this type.

Error in magventure/setIPI (line 1251) model = rawInfo.Model; %5th Byte of getInfo response

Error in MF5ppTMS (line 30) myMV.setIPI(10);

myMV.setMode('Twin'); myMV.setIPI(10); myMV.setBARatio(1.5);

bzf567 commented 4 years ago

Hope you have fixed it. The problem is with ‘currentDirection’. I think the following codes are missing in the original file:

switch currentDirection case 'Normal' currentDirN = '00'; case 'Reverse' currentDirN = '01'; end currentDir = currentDirN;

bzf567 commented 4 years ago

Or, When you us these funcitons, inputing '00' instead of 'Normal', '01' instead of 'Reverse'.