matlab-绘图标题中的变量
我想做什么matlab-绘图标题中的变量,matlab,plot,Matlab,Plot,我想做什么 for i = 1 : size(N, 2) figure(i); title('N = %d', i); %other stuff 但是设置标题是行不通的。为什么?因为你忘了添加sprintf for i = 1 : size(N, 2) figure(i); title(sprintf('N = %i', i)); %# %i for integer %other stuff end num2str也应该起作用 title(['N = ',num2str(
for i = 1 : size(N, 2)
figure(i);
title('N = %d', i);
%other stuff
但是设置标题是行不通的。为什么?因为你忘了添加
sprintf
for i = 1 : size(N, 2)
figure(i);
title(sprintf('N = %i', i)); %# %i for integer
%other stuff
end
num2str也应该起作用
title(['N = ',num2str(i)]);