Hello everyone,
I have variables in 8×1 double, in 40×1 double under 1×1 struct, and 1×1 double. Since I have the same varibles for different trials saved in different MATLAB files, I was trying to save all the variables from each trial in a table first and export to a excel for all trials. Then, copy and paste variables from each excel for each trial, and put them all together in a new excel. But when I run the code for making a table (as shown below), it gets into an error:
Error using table (line 233)
All table variables must have the same number of rows.
KineVar=table(AbdAngleMax,AbdAngleMin,AbdAngleChange,speed,FinSwingDist.dist,TailSwingDist.dist)EMGvariable.Properties.VariableNames{1} = 'AbdAngleMax';EMGvariable.Properties.VariableNames{2} = 'AbdAngleMin';EMGvariable.Properties.VariableNames{3} = 'AbdAngleChange';EMGvariable.Properties.VariableNames{4} = 'speed';EMGvariable.Properties.VariableNames{5} = 'FinSwingDist.dist';EMGvariable.Properties.VariableNames{5} = 'TailSwingDist.dist';fileName='KINEvariableResults.xlsx'writetable(KINEvariable,fileName)winopen(fileName)
Is there anything I could do to fix the issue? Or should I not use the table function?
Thank you very much for your help!
Best Answer