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

1 次查看(过去 30 天)
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 个)

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 CenterFile Exchange 中查找有关 2-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