Azzera filtri
Azzera filtri

Multiple Plot and saving as jpg

4 visualizzazioni (ultimi 30 giorni)
E R SH RAJ Male
E R SH RAJ Male il 28 Lug 2016
Risposto: dbmn il 28 Lug 2016
I want to have multiple plots and wants to save as jpg file separately as (i.e. 1.jpg ,2.jpg....)

Risposte (1)

dbmn
dbmn il 28 Lug 2016
Hi,
here's a piece of code that should get you started.
Best
Michael
clear all; close all; clc;
% Create the Figures (this part you already have in your code somewhere)
for i=1:1:3
figure
h(i) = plot(rand(10,1));
end
% Save the Figures as jpeg using the Graphics handle h(i)
for i=1:1:numel(h)
saveas(h(i),sprintf('%d.jpg', i))
end

Categorie

Scopri di più su Get Started with MATLAB in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by