I generated a struct file and tried to save it, but Matlab occurs error: The argument to -STRUCT must be the name of a scalar structure variable.
Below are the test code:
for i=1:1:100 fprintf('%0dth data.\n',i) eval(['test.p',num2str(i),'=1:1:2e5;']) end save('test.mat','-v7.3','-struct','S');
is there any problem with my code?
Thanks!
Yu
Best Answer