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
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 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subplots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!