writing an image into a new folder
古いコメントを表示
I have a code which was given by image analyser
H = figure;
for ii = 321:326
subplot(ii)
imagesc(magic(ceil(rand*10))); %random fig with 6 subplots
end
print('-dbmp256' , 'picture_of_6_subplots') %save as bmp
i want it to be saved in a folder named 'new',because i will have 100 figure windows,in which each figure window contains 8 subplotted images
採用された回答
その他の回答 (1 件)
Robert Cumming
2011 年 12 月 15 日
help saveas
e.g.
SAVEAS(H,fullfile ( 'new', 'FILENAME' ),'FORMAT')
6 件のコメント
Pat
2011 年 12 月 15 日
Robert Cumming
2011 年 12 月 15 日
filename is the filename of your image....
e.g. sprintf ( 'image_%i', ii );
where ii is your loop...
Pat
2011 年 12 月 15 日
Robert Cumming
2011 年 12 月 15 日
the filename is your choice. Have you looked at saveas? See the following code as an example you should be able to work it out from there...
h=figure
subplot(2,3,2); plot ( magic(100) );
saveas ( h, 'YOURFILENAME', 'bmp' )
Pat
2011 年 12 月 15 日
Robert Cumming
2011 年 12 月 15 日
I have given you all the information you need to workout the code yourself - I strongly encourage you to do that as you will learn more that way...
カテゴリ
ヘルプ センター および File Exchange で Images についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!