how to plot complex functions of phase and amplitude

5 vues (au cours des 30 derniers jours)
SP
SP le 29 Oct 2018
Commenté : Star Strider le 10 Mar 2021
I am trying to use f(t)=(1+0.25i)t–2.0 to plot the amplitude and phase of function f for 0 less than or equal to t less than or equal to 4 on two separate subplots within a single figure.
  2 commentaires
SP
SP le 29 Oct 2018
can you help me again;
I am trying to create an array of 100 input samples in the range of 1 to 100 using the linspace function, and plot the equation y(x)=20 log10(2x) on a semilogx plot. I would also like to draw a solid blue line of width 2, and label each point with a red circle. And I want to create an array of 100 input samples in the range of 1 to 100 using the logspace function, and plot the equation y(x)=20 log10(2x) on a semilogx plot with a solid red line of width 2, and label each point with a black star.
SP
SP le 5 Nov 2018
hi I would greatly appreciate your help again I am kind of stuck,
I am trying to create the spiral of archimedes by the equation r = θ and r is the distance of a point from the origin and θ is the angle of that point in radians. I am trying to plot the spiral of archimedes for 0 less than or equal to θ less than or equal to 6pi when k =0.5 so far I have this:
>> theta=0:pi/6:6*pi;
>> k=0.5;
>> r=k*theta;
>> polarplot(theta,r)
However I am not getting a regular spiral

Connectez-vous pour commenter.

Réponse acceptée

Star Strider
Star Strider le 29 Oct 2018
Try this:
f = @(t) (1+0.25i).*t-2.0;
t = linspace(0, 4);
figure
subplot(2,1,1)
plot(t, abs(f(t)))
title('Amplitude')
subplot(2,1,2)
plot(t, angle(f(t)))
title('Phase')
  5 commentaires
James Calandro
James Calandro le 10 Mar 2021
Thank you so much! This was exactly what I needed.
Star Strider
Star Strider le 10 Mar 2021
James Calandro — My pleasure!
(A Vote would be appreciated!)

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by