How to make subplots from plots generated from toolbox functions.
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi everyone,
I would like to make figures with subplots that are generated from a toolbox function. I use a function from the signal processing toolbox as an example. Here are two plots that plot separately into their own figures:
if true
% code
load train
findchangepts(y,'MaxNumChanges',6,'Statistic','rms');
figure
findchangepts(y,'MaxNumChanges',6);
end
and here is my attempt at putting them into one figure:
if true
% code
load train
p1=findchangepts(y,'MaxNumChanges',6,'Statistic','rms');
figure
p2=findchangepts(y,'MaxNumChanges',6);
subplot(2,1,1)
plot(p1)
title('first')
subplot(2,1,2)
plot(p2)
title('second')
end
the failed figure I get is:

thanks in advance.
1 Kommentar
Mohamed Nedal
am 24 Dez. 2019
Bearbeitet: Mohamed Nedal
am 24 Dez. 2019
Hi, I'm looking for an answer for your quesion too but what I know is that p1 and p2 here return the index at which the mean of x changes most significantly. So I think plotting p1 and p2 is meaningless.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Subplots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!