how to plot complex functions of phase and amplitude

5 visualizzazioni (ultimi 30 giorni)
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 Commenti
SP
SP il 29 Ott 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 il 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

Accedi per commentare.

Risposta accettata

Star Strider
Star Strider il 29 Ott 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 Commenti
James Calandro
James Calandro il 10 Mar 2021
Thank you so much! This was exactly what I needed.
Star Strider
Star Strider il 10 Mar 2021
James Calandro — My pleasure!
(A Vote would be appreciated!)

Accedi per commentare.

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by