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

1 visualización (últimos 30 días)
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 comentario
Aniket
Aniket el 8 de Jun. de 2013
how should i compute w1 then w2 and w3 and plot their result in same m file ?

Iniciar sesión para comentar.

Respuestas (1)

Youssef  Khmou
Youssef Khmou el 8 de Jun. de 2013
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) .

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by