Greetings all
I'm trying to figure out a way to
1)phase shift
2)vertical shift
3)increase/decrease the amplitude
4) increase/decrease the frequency of a periodic signal (x). I tried
multiplying the signal by cos(phi)+i*sin(phi) where phi is the new
phase of the signal but the phase stays the same and the amplitude
changes.
My thoughts where to somehow integrate the sine wave model into it.
http://jwelker.lps.org/eZedia/sin_modeling/frame_5.html
Is this possible?
Example code:
Fs = 100e2;
t=(0:Fs)/Fs';
x=sin(2*100*t);
% Now phase delay by pi/4 radians
y = x*cos((pi/4)+i*sin(pi/4));
% Finally take the real part (or the imaginary if you want)
plot(t(1:1000),real(x(1:1000)));
hold on;
plot(t(1:1000),real(y(1:1000)),'k');
thanks
sal22
bg - 15 Feb 2010 21:24 GMT
sal22 wrote in message ...
>Greetings all
>
[quoted text clipped - 26 lines]
>thanks
>sal22
Phase requires that two sine waves are being compared at the same instant in
time. ie if one sine is the reference, then a second sine could be plus or
minus so many degrees or seconds shifted. Not to sure where you are going
with this. But if the basic equation is Y = sinX ,
Phase shift -
Y = sine (X + constant) - constant will shift the phase by X - If the
first sine started at 0 degrees, adding 90 degrees would plot the same sine
shifted by 90 degrees
Amplitude -
Y = Constant * sineX where constant multiples the amplitude
Frequency -
Y = sine (X*constant) - where the constant multiplies the frequency
Verticle shift (an offset)
Y = (sine X ) + offset - where offset adds to or subtracts a constant from
the amplitude