I'm trying to read and load the .mat data (originally from .csv files) as following code;
input_data=xlsread('input_data_test.xlsx',1,'(B14:E18)'); [nofinput]=length(input_data(:,1)); start=input('press enter to start'); for ww=1:nofinput; ii=input_data(ww,:); if ii(isfinite(ii(:, 1)), :); run_1=ii; CA=run_1(1,1)CA_CA=CA;x_first=run_1(1,2)y_first=run_1(1,3)z_first=run_1(1,4)step_number=5[uu]=step_number;[cc]=26;AAA=zeros(uu,cc);clear uu ccSpeed=1600;Delta_CA=0.25Time_CA=(60/Speed)/360Delta_t=Delta_CA*Time_CA; load CA0000.mat load CA0025.matload CA0050.matfor tt=1:step_numberif CA==0 matrice_cartesian=CA0000.mat; elseif CA==0.25 matrice_cartesian=CA0025.mat; elseif CA==0.5 matrice_cartesian=CA0050.mat;end
but there's an error message; "Attempt to reference field of non-structure array" at line "elseif CA==0.25 matrice_cartesian=CA0025.mat;" So what is the possible cause for this problem? Please help, I'm really newbie in MATLAB code. Thanks
Best Answer