Hi everyone, any help on this will be highly appreciated!!
Here is my program:
fid = fopen('test.cal'); [paramlist l] = textscan(fid, '%s %s %s %s %s'); %paramlist is a variable
fclose(fid);[len wid] = size(paramlist{1}); %len=3, wid=4
chanlist = zeros(3,4); %chanlist is a variable
chanlist(1,1:4) = [paramlist{2}{1},paramlist{3}{1},paramlist{4}{1},paramlist{5}{1}]; %write the info from the test.cal into the 1st row of matrix, chanlist. Error happen due to this line.
Here is the "test.cal" file:
channel DIGOUT 0 0 shutter1 channel DIGOUT 0 1 shutter2 channel DIGOUT 0 2 shutter3
When I run the program, the error "subscripted assignment dimension mismatch" will show up, I really dont know how resolve it.
Best Answer