フィルターのクリア

How to save multiple Matlab figures in separate folders?

2 ビュー (過去 30 日間)
nancy
nancy 2018 年 4 月 4 日
コメント済み: nancy 2018 年 4 月 13 日
Hi,
I want to save each of multiple figures in separate folders.. What is the command that I can use?
For example: file1.fig will be saved in A folder, file2.fig will be saved in B folder.
How can I do this?
Thanks a lot..

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2018 年 4 月 4 日
編集済み: Fangjun Jiang 2018 年 4 月 4 日
use fullfile() to specify the full path of the file and saveas().
  3 件のコメント
Fangjun Jiang
Fangjun Jiang 2018 年 4 月 4 日
Fig=plot(rand(1,10));
File=fullfile('c:\MyDirectory','FolderA','MyFigure.fig');
saveas(Fig,File,'fig');
nancy
nancy 2018 年 4 月 13 日
Thank you very much..
How can I add this code to my Matlab code?
Because; I study on double Y-axis as you can see below. I mean that what can I write instead of "File" ?
figure;[haxes,hline1,hline2] = plotyy(dat_s,M1K1_norm,dat_s,T); set(haxes(1),'XLim',[0 DATA],'LineWidth',1.5); set(haxes(2),'XLim',[0 DATA]); set(haxes(1),'YLim',[0 1.3], 'FontSize', 16); set(haxes(1),'YTick',[0:0.13:1.3]); set(haxes(2),'YLim',[-60 90], 'FontSize', 16); set(haxes(2),'YTick',[-60:15:90]) set(hline1,'Color','r','LineWidth',3); set(hline2,'Color','y','LineWidth',3); set(haxes, 'FontSize',15,'LineWidth',2)
hold on;
[haxes,hline1,hline2] = plotyy(dat_s,M1K2_norm,dat_s,T); set(haxes(1),'XLim',[0 DATA]); set(haxes(2),'XLim',[0 DATA]); set(haxes(1),'YLim',[0 1.3], 'FontSize', 16); set(haxes(1),'YTick',[0:0.13:1.3],'Ycolor', 'k'); set(haxes(2),'YLim',[-60 90], 'FontSize', 16); set(haxes(2),'YTick',[-60:15:90], 'Ycolor', 'k'); set(hline1,'Color','b','LineWidth',3); set(hline2,'Color','k','LineWidth',3); ylabel('Normalize Güç'); ylabel(haxes(2),'Sicaklik (C)'); title('test');xlabel('A'); set(haxes, 'FontSize',15,'LineWidth',2) legend('test'); grid

サインインしてコメントする。

カテゴリ

Help Center および File ExchangePrinting and Saving についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by