poster
2019-12-14, 20:13
我有followinf的情况。我在文件夹中有包含数字数据的其他* .txt文件。我想将即将输出的绘图的图片保存在jpg文件中。伪代码将是这样的。
while(! more *.txt files in the folder) { plot(data) save_plot_data(plot1.jpg) } 最好的祝福
回答:
我会去这样的事情:
files = dir('*.txt'); for i=1:numel(files) h = plot(load(files(i).name)); saveas(h,sprintf('plot%d.jpg',i),'jpg'); end 最好
更多&回答... (https://stackoverflow.com/questions/5106824)
while(! more *.txt files in the folder) { plot(data) save_plot_data(plot1.jpg) } 最好的祝福
回答:
我会去这样的事情:
files = dir('*.txt'); for i=1:numel(files) h = plot(load(files(i).name)); saveas(h,sprintf('plot%d.jpg',i),'jpg'); end 最好
更多&回答... (https://stackoverflow.com/questions/5106824)