hi to all
1) i want to plot below two figures in single figure. i want to plot figure1 and figure2 in single figure3.
r=[12 23 45 67 77]
p=[44 55 66 77 88 ]
g=[21 33 23 34 54]
k=[55 45 43 23 12]
figure1
plot(r)
hold on
plot(p)
figure2
plot(g)
hold on
plot(k)

 採用された回答

Stephan
Stephan 2020 年 11 月 25 日
編集済み: Stephan 2020 年 11 月 25 日

1 投票

r=[12 23 45 67 77]
p=[44 55 66 77 88 ]
g=[21 33 23 34 54]
k=[55 45 43 23 12]
figure
plot(r)
hold on
plot(p)
plot(g)
plot(k)
hold off
Alternative:
r=[12 23 45 67 77]
p=[44 55 66 77 88 ]
g=[21 33 23 34 54]
k=[55 45 43 23 12]
figure
subplot(2,1,1)
plot(r)
hold on
plot(p)
subplot(2,1,2)
plot(g)
hold on
plot(k)

6 件のコメント

Engineer Batoor khan mummand
Engineer Batoor khan mummand 2020 年 11 月 25 日
hi
thanks from reply but i want two plot two figures in one.
Stephan
Stephan 2020 年 11 月 25 日
Do you mean a kind of sub-figures inside a parent-figure?
Engineer Batoor khan mummand
Engineer Batoor khan mummand 2020 年 11 月 25 日
yeas
Stephan
Stephan 2020 年 11 月 25 日
I think this is not possible. The functionality you ask for is given through the subplot function, which i provided in my alternative solution. Since you can order plots of different types one above the other or side by side with this function, it is not needed to have subfigures - thats why you can do subplots.
r=[12 23 45 67 77]
p=[44 55 66 77 88 ]
g=[21 33 23 34 54]
k=[55 45 43 23 12]
figure
subplot(2,1,1)
plot(r)
hold on
plot(p)
subplot(2,1,2)
plot(g)
hold on
plot(k)
Image Analyst
Image Analyst 2020 年 11 月 25 日
Please post an image of what you'd like to achieve so we know how to do it.
Also, regarding your tags, what does this question have to do with image processing, image segmentation, or the MATLAB Coder product (which turns MATLAB code into C code)?
Engineer Batoor khan mummand
Engineer Batoor khan mummand 2020 年 11 月 26 日
ok thank so much dear from your reply.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeImages についてさらに検索

製品

リリース

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by