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

3 ビュー (過去 30 日間)
Aniket
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
Aniket 2013 年 6 月 8 日
how should i compute w1 then w2 and w3 and plot their result in same m file ?

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

回答 (1 件)

Youssef  Khmou
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 Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by