suppose i have a sinusoidal wave with multiple frequencies in it..and it dies out after some time...just like the plot of sprung mass displacement subjected to damping...i referred various videos ..in which they represented the main signal into a for
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
suppose i have a sinusoidal wave with multiple frequencies in it..and it dies out after some time...just like the plot of sprung mass displacement subjected to damping...in a suspension system .. i referred various videos ..in which they represented the main signal into a form y=A1*(sin (2*pi*f1*t+phase diff))+A2 *(sin(2*pi*f2*t))+A3...and so on...so they did quantization of the main signal...but if your main signal has multiple frequencies in it...quantising will be difficult and time consuming...and how do you represent the main signal into the form i mentioned above..(any short cut available in matlab to get the main signal directly into the form as stated above...rather than evaluating each part manually...)i need for FTT transformation..early help is appreciated..
0 Kommentare
Akzeptierte Antwort
Wayne King
am 15 Jun. 2013
Bearbeitet: Wayne King
am 15 Jun. 2013
If you know the frequencies, amplitudes, and phases, then yes, it is very easy to construct signal which is a superposition of sinusoidal components. You can create them one by one and add them together, or you can create them in matrix form and sum the columns or rows to get the final signal.
t = (0:1e-4:1)';
omegas = 2*pi*(100:100:600);
t = repmat(t,1,6);
omegas = repmat(omegas,size(t,1),1);
omega = omegas.*t;
phi = -pi+2*pi*rand(1,6);
phi = repmat(phi,size(t,1),1);
theta = 2*pi*omega+phi;
y = cos(theta);
y = sum(y,2);
I haven't included the exponential decay term, but it easy to do.
Conceptually simplier is to create them like this:
t = (0:1e-4:1)';
y = exp(-0.5*t).*cos(2*pi*100*t-pi/4)+ 0.5*exp(-0.5*t).*cos(2*pi*t-pi/2);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Signal Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!