How to Plot Phase Plane and Nullclines in MatLab?Piecewise function plot in MatlabHow to plot not only the result but also the derivatives of an ode using the ode45 function in Matlab?Matlab, how to know time step size in the plot or how can I get the output of time step size?Plot phase plane for system of differential equationsSolving an ODE in the complex plane using a MatLab ODE solversolve a system of 8 coupled ODEsTwo couple equation first order Runge Kutta Matlab troubles?Population dynamics with one or two species - phase plotPhase plot of a system of differential equations using MatlabCircle and spiral phase portaits

How dangerous is XSS

how do we prove that a sum of two periods is still a period?

Expand and Contract

One verb to replace 'be a member of' a club

How does a dynamic QR code work?

Do Iron Man suits sport waste management systems?

Ambiguity in the definition of entropy

Where would I need my direct neural interface to be implanted?

Is this draw by repetition?

Avoiding the "not like other girls" trope?

How exploitable/balanced is this homebrew spell: Spell Permanency?

Using "tail" to follow a file without displaying the most recent lines

How seriously should I take size and weight limits of hand luggage?

How to show a landlord what we have in savings?

Does Dispel Magic work on Tiny Hut?

GFCI outlets - can they be repaired? Are they really needed at the end of a circuit?

Can a virus destroy the BIOS of a modern computer?

How to travel to Japan while expressing milk?

Is it a bad idea to plug the other end of ESD strap to wall ground?

What do you call someone who asks many questions?

ssTTsSTtRrriinInnnnNNNIiinngg

"the same as" in a sentence

Venezuelan girlfriend wants to travel the USA to be with me. What is the process?

Notepad++ delete until colon for every line with replace all



How to Plot Phase Plane and Nullclines in MatLab?


Piecewise function plot in MatlabHow to plot not only the result but also the derivatives of an ode using the ode45 function in Matlab?Matlab, how to know time step size in the plot or how can I get the output of time step size?Plot phase plane for system of differential equationsSolving an ODE in the complex plane using a MatLab ODE solversolve a system of 8 coupled ODEsTwo couple equation first order Runge Kutta Matlab troubles?Population dynamics with one or two species - phase plotPhase plot of a system of differential equations using MatlabCircle and spiral phase portaits













0












$begingroup$


I am trying to reproduce an example from the book "Nonlinear Dynamics and Chaos" by Strogatz - Example 5.2.2.



Given are:



$fracdXdt = X + Y$ and $fracdYdt = 4X - 2Y$ with initial conditions $(2,-3)$.



Solving the equations is not the problem, I just don't know how to plot the phase plane and the nullclines (where $fracdXdt = 0$ and $fracdYdt = 0$) properly in MatLab.



The outcome should be:
Fig 5.2.2



For the phase plane, I tried:





function solve
[t,x]=ode45(@dxdt1,[-10 10],[2 -3]);

plot(x(:,1),x(:,2))
plot(x(:,2),x(:,1))
end

function d=dxdt1(t,x)
d = [x(1) + x(2); 4 * x(1) - 2 * x(2)];
end


However, I only get a line.










share|cite|improve this question







New contributor




cz5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$











  • $begingroup$
    Yes, I'd like to use plot if possible rather than quiver and I still have no idea how to plot the nullclines properly.
    $endgroup$
    – cz5
    Mar 28 at 17:26















0












$begingroup$


I am trying to reproduce an example from the book "Nonlinear Dynamics and Chaos" by Strogatz - Example 5.2.2.



Given are:



$fracdXdt = X + Y$ and $fracdYdt = 4X - 2Y$ with initial conditions $(2,-3)$.



Solving the equations is not the problem, I just don't know how to plot the phase plane and the nullclines (where $fracdXdt = 0$ and $fracdYdt = 0$) properly in MatLab.



The outcome should be:
Fig 5.2.2



For the phase plane, I tried:





function solve
[t,x]=ode45(@dxdt1,[-10 10],[2 -3]);

plot(x(:,1),x(:,2))
plot(x(:,2),x(:,1))
end

function d=dxdt1(t,x)
d = [x(1) + x(2); 4 * x(1) - 2 * x(2)];
end


However, I only get a line.










share|cite|improve this question







New contributor




cz5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$











  • $begingroup$
    Yes, I'd like to use plot if possible rather than quiver and I still have no idea how to plot the nullclines properly.
    $endgroup$
    – cz5
    Mar 28 at 17:26













0












0








0





$begingroup$


I am trying to reproduce an example from the book "Nonlinear Dynamics and Chaos" by Strogatz - Example 5.2.2.



Given are:



$fracdXdt = X + Y$ and $fracdYdt = 4X - 2Y$ with initial conditions $(2,-3)$.



Solving the equations is not the problem, I just don't know how to plot the phase plane and the nullclines (where $fracdXdt = 0$ and $fracdYdt = 0$) properly in MatLab.



The outcome should be:
Fig 5.2.2



For the phase plane, I tried:





function solve
[t,x]=ode45(@dxdt1,[-10 10],[2 -3]);

plot(x(:,1),x(:,2))
plot(x(:,2),x(:,1))
end

function d=dxdt1(t,x)
d = [x(1) + x(2); 4 * x(1) - 2 * x(2)];
end


However, I only get a line.










share|cite|improve this question







New contributor




cz5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$




I am trying to reproduce an example from the book "Nonlinear Dynamics and Chaos" by Strogatz - Example 5.2.2.



Given are:



$fracdXdt = X + Y$ and $fracdYdt = 4X - 2Y$ with initial conditions $(2,-3)$.



Solving the equations is not the problem, I just don't know how to plot the phase plane and the nullclines (where $fracdXdt = 0$ and $fracdYdt = 0$) properly in MatLab.



The outcome should be:
Fig 5.2.2



For the phase plane, I tried:





function solve
[t,x]=ode45(@dxdt1,[-10 10],[2 -3]);

plot(x(:,1),x(:,2))
plot(x(:,2),x(:,1))
end

function d=dxdt1(t,x)
d = [x(1) + x(2); 4 * x(1) - 2 * x(2)];
end


However, I only get a line.







linear-algebra matlab






share|cite|improve this question







New contributor




cz5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|cite|improve this question







New contributor




cz5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|cite|improve this question




share|cite|improve this question






New contributor




cz5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Mar 28 at 16:14









cz5cz5

1




1




New contributor




cz5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





cz5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






cz5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • $begingroup$
    Yes, I'd like to use plot if possible rather than quiver and I still have no idea how to plot the nullclines properly.
    $endgroup$
    – cz5
    Mar 28 at 17:26
















  • $begingroup$
    Yes, I'd like to use plot if possible rather than quiver and I still have no idea how to plot the nullclines properly.
    $endgroup$
    – cz5
    Mar 28 at 17:26















$begingroup$
Yes, I'd like to use plot if possible rather than quiver and I still have no idea how to plot the nullclines properly.
$endgroup$
– cz5
Mar 28 at 17:26




$begingroup$
Yes, I'd like to use plot if possible rather than quiver and I still have no idea how to plot the nullclines properly.
$endgroup$
– cz5
Mar 28 at 17:26










0






active

oldest

votes












Your Answer





StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






cz5 is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3166106%2fhow-to-plot-phase-plane-and-nullclines-in-matlab%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes








cz5 is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















cz5 is a new contributor. Be nice, and check out our Code of Conduct.












cz5 is a new contributor. Be nice, and check out our Code of Conduct.











cz5 is a new contributor. Be nice, and check out our Code of Conduct.














Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3166106%2fhow-to-plot-phase-plane-and-nullclines-in-matlab%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Triangular numbers and gcdProving sum of a set is $0 pmod n$ if $n$ is odd, or $fracn2 pmod n$ if $n$ is even?Is greatest common divisor of two numbers really their smallest linear combination?GCD, LCM RelationshipProve a set of nonnegative integers with greatest common divisor 1 and closed under addition has all but finite many nonnegative integers.all pairs of a and b in an equation containing gcdTriangular Numbers Modulo $k$ - Hit All Values?Understanding the Existence and Uniqueness of the GCDGCD and LCM with logical symbolsThe greatest common divisor of two positive integers less than 100 is equal to 3. Their least common multiple is twelve times one of the integers.Suppose that for all integers $x$, $x|a$ and $x|b$ if and only if $x|c$. Then $c = gcd(a,b)$Which is the gcd of 2 numbers which are multiplied and the result is 600000?

Ingelân Ynhâld Etymology | Geografy | Skiednis | Polityk en bestjoer | Ekonomy | Demografy | Kultuer | Klimaat | Sjoch ek | Keppelings om utens | Boarnen, noaten en referinsjes Navigaasjemenuwww.gov.ukOffisjele webside fan it regear fan it Feriene KeninkrykOffisjele webside fan it Britske FerkearsburoNederlânsktalige ynformaasje fan it Britske FerkearsburoOffisjele webside fan English Heritage, de organisaasje dy't him ynset foar it behâld fan it Ingelske kultuergoedYnwennertallen fan alle Britske stêden út 'e folkstelling fan 2011Notes en References, op dizze sideEngland

Հադիս Բովանդակություն Անվանում և նշանակություն | Դասակարգում | Աղբյուրներ | Նավարկման ցանկ