Nice of you all to answer my question.
I tried to graph the nonlinear ordinary DE in a textbook(Advanced Engineering Mathematics 6th Ed by Zill Wright).\
the DE is like this.
dy/dx = u
du/dx = x + y - y^2
Written the codes like below, but only gained 2 graphs each.
function dydt = odesys(t, y)
dydt(2) = t + y(2) - y(2)^2;
dydt = [dydt(1); dydt(2)];
[t, y] = ode45(@odesys, [-1 1], [-1 1])
I want to get the graph as on the textbook, like the picture right below.(In case of copyright, I couldn't get original picture in the book)
What is wrong with my code?