I have a MATLAB script where I load data from an xlsx-file, using 'xlsread(filename,sheet,xlRange)'. However this gives me the data in cells. I want to turn these into variables. I tried a loop using cell2mat but this didn't work:
[subsetA,y] = xlsread(filename,sheet,xlRange);N = length(y(:,1));y1=zeros(1,N);for i=1:N y1(i) = y{i,1};end
Doesn't work…. Any suggestions?
Best Answer