Writing exponent in pplane for Matlab

3 Ansichten (letzte 30 Tage)
Holli Sharples
Holli Sharples am 8 Nov. 2021
Bearbeitet: John D'Errico am 9 Nov. 2021
I'm trying to use the pplane code to generate a phase portrait for
dn/dt=n^(2/3)*(1n)en
but the graph will not acknowledge 2/3 as a full exponent.I keep getting things that look like this when I type n^(2/3):
Or when I type n^2/3 it'll make a graph using (n^2)/3.
How can I fix this? Or rewrite the equation in pplane to graph the correct form of the equation?
Thank you

Antworten (1)

John D'Errico
John D'Errico am 8 Nov. 2021
Bearbeitet: John D'Errico am 9 Nov. 2021
pplane is not part of MATLAB, so it must be a package from the file exchange, or some other source. You might want to contact the author with questions.
You raise a number to a fractional power like this:
n^(2/3)
Why? Exponentiation has a higher order of precedence than division. So when you wrote n^2/3, MATLAB sees n^2, and recgnizes that exponentation comes first in the list. So it squares n, and THEN divides the result by 3.
Since you want MATLAB to raise it to the (2/3) power, just use parens as I show.
  1 Kommentar
Holli Sharples
Holli Sharples am 9 Nov. 2021
yes, unfortunately I did try that the first time and gave me this for the graph:
It only put the first paranthesis in the exponent position and left the rest as scalars.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by