Another frequently used computer algebra system is MATLAB. You can also use this to find solutions to the initial value problem. With MATLAB, you don’t have to be sure to select Worksheet mode as in Maple or a Notebook as in Mathematica. You just open it and type in what you want after >>. This is very nice. As with Maple, if you want commands to appear on separate lines, you use “shift enter”. Mathematica is the only one which uses “shift enter” to cause the software to do something.
The basic version of MATLAB is sufficient to do the numerical procedures discussed. In order to do procedures which involve commands like “syms” you will need to have the symbolic math toolbox also. In particular, you need this toolbox for the first example given here in which “dsolve” is used, but not for the numerical procedures mentioned next.
Here is what you type to get MATLAB to compute the solution to

After the >> you type the following:

After typing in the above, you press enter and here is what results.

If you want a graph of this solution, this is also easy to get. After doing the above, type in the following to the right of >>

and then press “enter” to obtain the graph of the solution on the interval
Similarly, you can ask for numerical solutions in case you can’t find an analytical solution. MATLAB can find these also. For example, if you wanted to solve on the interval

You would do the following: After >> you type

Next, type the following on a new line:
 (*) 
and on the next new line,

and press “enter”. This will give a large table of values of x followed by values of y which comes from using a suitable numerical method named ode45 and it will also plot the solution.
If you don’t want to see this large table of values, simply place a ; at the end of ∗. This will cause MATLAB to defer displaying the table even though it knows about it.
If you placed ; at the end of ∗, and decide you would like to see y
Another thing which is pretty easy to do in MATLAB is to change the initial conditions and graph the two solutions on the same set of axes. The above gives you a graph of y

and press return. This will define the function x1 → y1(x1). Then to graph both on the same axes, you would type

and both will appear. You can do as many of these as you want of course. If you wanted to do a lot of graphs all at once, you can also have this done. You would do the following:

Then press “enter” and you will get graphs of solutions for initial conditions

With the above, which is solving

for various values of z, you get the following graph.
Note how this illustrates that there are three equilibrium points −1,0,1 and that the first and third are stable but 0 is not.
You can also do the following. After defining a function, say h=@(t,y) [yyˆ3], you do the following:

then press “enter”. You should get the values of y at the points 1,2,3,4,5. Remember that to place on a new line, you use “shift enter”. You could also use any other symbol for “sol”.
Another thing I have noticed when using MATLAB is that it sometimes puts the graph behind the command window so you don’t see it till you shrink the command window.
To adjust the appearance of the graph which results, you go to the graph and click on file and then export setup. You can make changes in a dialog box and do things like change the thickness of the lines and the size of the font very easily. Then you can save it as an eps file or several other kinds of files.
Also, when you are done, type >> clear all or close all and then “enter”. Then type >> clf and “enter” to get rid of any graphs it may have done and press “enter”. To clear the screen, type >>clc and then press “enter”. This is a very good idea because if you want to do something else, you don’t want MATLAB to be confused about what you mean and it will be confused if it can.