How to make subplots from plots generated from toolbox functions.

5 次查看(过去 30 天)
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 个评论
Mohamed Nedal
Mohamed Nedal 2019-12-24
编辑:Mohamed Nedal 2019-12-24
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.

请先登录,再进行评论。

回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by