how to compute and plot results for three different frequency vector ?
    6 views (last 30 days)
  
       Show older comments
    
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 ?
Answers (1)
  Youssef  Khmou
      
 on 8 Jun 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) .
0 Comments
See Also
Categories
				Find more on 2-D and 3-D Plots in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
