How to plot this type of function?

3 views (last 30 days)
Dinh Le Dung
Dinh Le Dung on 3 Aug 2022
Edited: KSSV on 4 Aug 2022
  2 Comments
Walter Roberson
Walter Roberson on 4 Aug 2022
Strange, I could have sworn I saw someone post code for this involving fplot3()

Sign in to comment.

Answers (1)

KSSV
KSSV on 4 Aug 2022
Edited: KSSV on 4 Aug 2022
t = linspace(-5,5) ;
x = exp(t) ;
y = 1-exp(-t) ;
z = atan2(y,x) ;
plot(t,z)
  3 Comments
Walter Roberson
Walter Roberson on 4 Aug 2022
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 on 4 Aug 2022
Edited: KSSV on 4 Aug 2022
@Walter Roberson agree.....edited the code.

Sign in to comment.

Categories

Find more on Line Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!