I merged two parts together and I want to draw them together but in two different colors
fb=[fr;fi];
when
stem (fb) ;
the output one colors I want output two colors in one plot

 採用された回答

KSSV
KSSV 2019 年 2 月 11 日
編集済み: KSSV 2019 年 2 月 11 日

0 投票

A = rand(3,1) ;
B = rand(3,1) ;
x1 = 1:length(A) ;
x2 = (1:length(B))+length(A) ;
figure
hold on
stem(x1,A,'r')
stem(x2,B,'b')

7 件のコメント

abdullah qasim
abdullah qasim 2019 年 2 月 11 日
thank u but I want stem B after stem A
KSSV
KSSV 2019 年 2 月 11 日
Edited the code.
abdullah qasim
abdullah qasim 2019 年 2 月 11 日
編集済み: abdullah qasim 2019 年 2 月 11 日
I mean that stem( A) starts from (0: N-1)and stem (B) from (N :2(N-1)) in same plot at different colours.
KSSV
KSSV 2019 年 2 月 11 日
Yes....you can do that....
abdullah qasim
abdullah qasim 2019 年 2 月 11 日
how
KSSV
KSSV 2019 年 2 月 11 日
I gave you an exampel code.....you need to do the same with that....your fr is A and fl is B...
abdullah qasim
abdullah qasim 2019 年 2 月 11 日
編集済み: abdullah qasim 2019 年 2 月 11 日
thank u very much

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

その他の回答 (0 件)

カテゴリ

質問済み:

2019 年 2 月 11 日

編集済み:

2019 年 2 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by