how to plot complex functions of phase and amplitude

조회 수: 5 (최근 30일)
SP
SP 2018년 10월 29일
댓글: Star Strider 2021년 3월 10일
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
SP
SP 2018년 10월 29일
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 2018년 11월 5일
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

댓글을 달려면 로그인하십시오.

채택된 답변

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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by