filename = ‘test.mat‘;
save(filename)
p = rand(1,10);
q = ones(10);
save(‘pqfile.mat‘,‘p‘,‘q‘)
load(filename)
for ii=1:10
h=figure(ii);
x=0:0.01:ii;
y=sin(x);
plot(x,y);
set(h,‘visible‘,‘off‘);
str=sprintf(‘figure(%d)‘,ii);
saveas(h,str,‘jpg‘);
end
发现一个讲的很清楚的博客MATLAB 的 cell 大法(单元格数组)。
摘录对于理解至关重要的几点:
C{1,1} = ‘this is a cell array‘
A = C{1,1};
% A是一个字符串
C(1,1) = {‘this is a cell array‘}
A = C(1,1);
% A是一个元胞数组
原文:https://www.cnblogs.com/tofengz/p/13411849.html