How to make subplots from plots generated from toolbox functions.

5 visualizzazioni (ultimi 30 giorni)
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 Commento
Mohamed Nedal
Mohamed Nedal il 24 Dic 2019
Modificato: Mohamed Nedal il 24 Dic 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.

Accedi per commentare.

Risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by