How to plot this type of function?

2 Kommentare

Walter Roberson
Walter Roberson am 4 Aug. 2022
Strange, I could have sworn I saw someone post code for this involving fplot3()
Dinh Le Dung
Dinh Le Dung am 4 Aug. 2022
That was me LOL

Melden Sie sich an, um zu kommentieren.

Antworten (1)

KSSV
KSSV am 4 Aug. 2022
Bearbeitet: KSSV am 4 Aug. 2022

0 Stimmen

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

3 Kommentare

syms t
x = exp(t) ;
y = 1-exp(-t) ;
z = atan(y./x) ;
fplot(z)
Walter Roberson
Walter Roberson am 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 am 4 Aug. 2022
Bearbeitet: KSSV am 4 Aug. 2022
@Walter Roberson agree.....edited the code.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Line Plots finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 3 Aug. 2022

Bearbeitet:

am 4 Aug. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by