How can I plot multiple curves in one figure using "SLM - Shape Language Modeling"?
조회 수: 4 (최근 30일)
이전 댓글 표시
I'm trying to plot at least two curves into the same figure with SLM. I'm totally new to matlab, so I need a little help with this. I'm into a for-loop, in every loop two sets of data points are plotted and every set needs its own fitting curve. I just tried something like this, but it didn't work.
for i = 2:2:(size(num,2)/2)
slm = slmengine(Spalte{1},Spalte{i},'plot','on','knots',10,'increasing','on', ...
'leftslope',0,'rightslope',0);
slm1 = slmengine(Spalte{1},Spalte{i+6},'plot','on','knots',10,'increasing','on', ...
'leftslope',0,'rightslope',0);
figure
p = plotslm(slm);
hold on
p1 = plotslm(slm1);
end
Would be great if anyone could help!
Thanks and cheers,
Karin
댓글 수: 3
답변 (1개)
Matt J
2012년 12월 14일
If you want to control which figure window the plot is made in, e.g, if you have a prior figure handle, H, you could try,
H=figure; hold on
for i = 2:2:(size(num,2)/2)
slm = slmengine(Spalte{1},Spalte{i},'plot','on','knots',10,'increasing','on', ...
'leftslope',0,'rightslope',0);
slm1 = slmengine(Spalte{1},Spalte{i+6},'plot','on','knots',10,'increasing','on', ...
'leftslope',0,'rightslope',0);
figure(H);
plotslm(slm);
figure(H)
plotslm(slm1);
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Histograms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!