Problems to compute a phase shift using sinusoidal functions
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Darryl
am 16 Nov. 2013
Beantwortet: Wayne King
am 16 Nov. 2013
I am having problems trying to compute a phase shift using sinusoidal functions. For example I am trying to achieve this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/153049/image.png)
I can compute this giving it a vertical transition, but no matter where I add its incorrect when plotted along side the above equation without the phase shift.
This is without the attempted phase shift:
y = 3*sin(x*(2*pi/4))+2;
x = [0:0.1:100];
0 Kommentare
Akzeptierte Antwort
Wayne King
am 16 Nov. 2013
x = 0:0.1:10;
y1 = 3*sin(4*x); % phase of zero
y2 = 3*sin(4*(x-pi/4)); % phase shift of \pi radians
plot(x,y1);
hold on
plot(x,y2,'r')
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Spectral Measurements 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!