# how to compute and plot results for three different frequency vector ?

1 回表示 (過去 30 日間)
Aniket 2013 年 6 月 8 日
hello ,
i want to use three different frequency vectors and want to plot their results in same graph how should i do this ?
first i want to compute w1 = [2*pi*90 2*pi*110];
second is w2= [2*pi*130 2*pi*150];
third is w3 = [2*pi*190 2*pi*210];
i have written a code for computing only 1 vector
******************
w1 = [2*pi*190 2*pi*210];
m = length(w1);
Aik = zeros(2,2,m);
Bik = zeros(2,1,m);
Cik = zeros(1,2,m);
for i = 1:m
Aik(:,:,i) = [0 1; -w1(i)^2 0];
Bik(:,:,i) = [0 w1(i)^2];
Cik(:,:,i) = [1 0];
end
*************************
how should i again compute w2 and w3 in the same m file and plot result in one graph for w1, w2,w3 ?
##### 1 件のコメント表示 なし非表示 なし
Aniket 2013 年 6 月 8 日
how should i compute w1 then w2 and w3 and plot their result in same m file ?

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

### 回答 (1 件)

Youssef Khmou 2013 年 6 月 8 日
hi, you can plot your three signals in the same graph using subplot command as this example :
r1=randn(100,1);
r2=rand(100,1);
r3=r1+r2;
subplot(1,3,1)
plot(r1)
subplot(1,3,2)
plot(r2)
subplot(1,3,3)
plot(r3)
So the command subplot has the structure subplot(Line,Column, Position) .

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

### カテゴリ

Help Center および File ExchangeSubplots についてさらに検索

### Community Treasure Hunt

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

Start Hunting!