Borrar filtros
Borrar filtros

How to save multiple Matlab figures in separate folders?

2 visualizaciones (últimos 30 días)
nancy
nancy el 4 de Abr. de 2018
Comentada: nancy el 13 de Abr. de 2018
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..

Respuestas (1)

Fangjun Jiang
Fangjun Jiang el 4 de Abr. de 2018
Editada: Fangjun Jiang el 4 de Abr. de 2018
use fullfile() to specify the full path of the file and saveas().
  3 comentarios
Fangjun Jiang
Fangjun Jiang el 4 de Abr. de 2018
Fig=plot(rand(1,10));
File=fullfile('c:\MyDirectory','FolderA','MyFigure.fig');
saveas(Fig,File,'fig');
nancy
nancy el 13 de Abr. de 2018
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

Iniciar sesión para comentar.

Categorías

Más información sobre Printing and Saving en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by