![]() |
使用Matlab在文件夹中查找txt文件并将图另存为jpg
我有followinf的情况。我在文件夹中有包含数字数据的其他* .txt文件。我想将即将输出的绘图的图片保存在jpg文件中。伪代码将是这样的。
while(! more *.txt files in the folder) { plot(data) save_plot_data(plot1.jpg) } 最好的祝福 [B]回答:[/B] 我会去这样的事情: files = dir('*.txt'); for i=1:numel(files) h = plot(load(files(i).name)); saveas(h,sprintf('plot%d.jpg',i),'jpg'); end 最好 [url=https://stackoverflow.com/questions/5106824]更多&回答...[/url] |
所有时间均为北京时间。现在的时间是 04:58。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.