How to plot this type of function?

댓글 수: 2

Walter Roberson
Walter Roberson 2022년 8월 4일
Strange, I could have sworn I saw someone post code for this involving fplot3()
Dinh Le Dung
Dinh Le Dung 2022년 8월 4일
That was me LOL

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

답변 (1개)

KSSV
KSSV 2022년 8월 4일
편집: KSSV 2022년 8월 4일

0 개 추천

t = linspace(-5,5) ;
x = exp(t) ;
y = 1-exp(-t) ;
z = atan2(y,x) ;
plot(t,z)

댓글 수: 3

syms t
x = exp(t) ;
y = 1-exp(-t) ;
z = atan(y./x) ;
fplot(z)
Walter Roberson
Walter Roberson 2022년 8월 4일
Note that atan(y./x) is usually better done as atan2(y, x) . The difference is that atan2() will get the right quadrant.
KSSV
KSSV 2022년 8월 4일
편집: KSSV 2022년 8월 4일
@Walter Roberson agree.....edited the code.

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

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

질문:

2022년 8월 3일

편집:

2022년 8월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by