I am trying to save some files iteratively in a loop anf getting below error. Can someone please help me out?
Error: Error using save
Must be a string scalar or character vector.
names=["CH" , "OH" , "EX" , "FL" , "GR" , "IN" , "SU" , "PR" , "RT"];fields = fieldnames(U);fields = fields(5:13);for j=1:nMotions for i=1:nChannels CM=U.(fields{j}); CM=CM(:,i); ConcatenatedSignal=CM'; flag=1; for k=1:1:floor(length(ConcatenatedSignal)/nos) dataA = ConcatenatedSignal(flag:1:nos+flag-1); save(['C:\Users\AKRA\Desktop\New folder\' names(j),'\channel' num2str(i),'/M_' num2str(k) '.mat'],'dataA'); flag=flag+nos; end endend
Best Answer