필터 지우기
필터 지우기

Trying to plot complex function for varying value of t

조회 수: 2 (최근 30일)
Keaton Looper
Keaton Looper 2024년 3월 17일
댓글: Walter Roberson 2024년 3월 20일

My function is given by exp(i*t) and I want to plot the function for varying values of t. The function should show that it curves closer and closer to the imaginary axis as t increase from 0 to pi how would I show this and graph each increment on a graph? I have put an image using Desmos to show what I want matlab to graph.

  댓글 수: 5
Keaton Looper
Keaton Looper 2024년 3월 17일
Yes I want to show how for each value of t from 0 to pi the function curve gets closer to the imaginary axis as seen in the image above
dpb
dpb 2024년 3월 17일
You're going to have to show us how you did what you did in Desmos; it doesn't look like what you describe to me.
clear all
t=linspace(0,pi); % vary t from 0 to pi
plot(exp(i*t)) % plot the function against t
ylim(xlim) % put on even range
axis square % and the same footing in space

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

답변 (1개)

Binaya
Binaya 2024년 3월 20일
Hi Keaton
By Euler's formula, use of the expression "exp(i*t)" results in the expression "cos(t)+i*sin(t)". From this expression, it can be concluded that the maximum value of the expression can be 1 in either real axis or imaginary axis.
When you try to plot this "exp(i*t)", where t ranges from 0 to pi, you get a half circle as shown below:
t=0:0.01:pi;
y=exp(i*t);
plot(y);axis equal;
The plot generated by desmos does not seem to take into account the "i" or imaginary number when calculating the plot of the exponential which leads to the a plot of exponential function with real inputs.
  댓글 수: 1
Walter Roberson
Walter Roberson 2024년 3월 20일
As a special case, if you plot() a single variable and the variable is complex-valued, then it plots imaginary component of the value versus real component of the value.

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

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by