exponential function phase reversal

8 Ansichten (letzte 30 Tage)
STP
STP am 4 Apr. 2019
I wish to know when using exponential function do i get a phase reversal of 180 degrees like -- exp(1i*0) to exp(1i*pi) or exp(1i*180)?

Antworten (1)

Bjorn Gustavsson
Bjorn Gustavsson am 4 Apr. 2019
Try:
phi = linspace(-5*pi,5*pi,5*360+1);
Phi = angle(exp(1i*phi));
plot(phi,Phi)
grid on
set(gca,'XTick',[-2.5*360:180:2.5*360])
HTH
  2 Kommentare
Bjorn Gustavsson
Bjorn Gustavsson am 4 Apr. 2019
OK, so you will need to write a function that is zero for all times except for a brief period of time, in that time-period you'll have something that looks like a parabloically (exponentially, something with an increasing rate of phase-variation) and then back to zero. Preferably your function should return a vector of phases for a vector of times in. Something like:
function Phi = my_phase_variationing(t)
if t_start <= t && t < t_stop
Phi = t.^2;
else
Phi = 23;
end
end
Adapt after your own needs.
Bjorn Gustavsson
Bjorn Gustavsson am 4 Apr. 2019
Yes. Have a look at the function-sketch I gave above. Read it think about what it does, and how it takes you halfway to what you want. Then have a think about how you can modify that sketch to make what you need for your homework. Ask yourself these questions:
  • Can I use something like elseif to split up a time-vector into multiple segments?
  • Can I use logical indexing to smoothly vectorize the code? Or do I perhaps need to loop over all elements in t?
  • How do I get real-complex values from given phase-values?
After you've asked and answered those questions you will see that you can solve this problem rather easily. I will not write what I start to think because I start to have opinions.
HTH

Melden Sie sich an, um zu kommentieren.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by