# Doing a phase-space portrait in matlab

• MATLAB

## Main Question or Discussion Point

So I have this system of equations:

$$\binom{x_{n+1}}{y_{n+1}}=\begin{pmatrix}e^{r} & 0 \\ 0 & e^{-r} \end{pmatrix}\begin{pmatrix}cos(\phi+I_{n}) & -sin(\phi+I_{n}) \\ sin(\phi+I_{n}) & cos(\phi+I_{n}) \end{pmatrix}\begin{pmatrix}x_{n}\\ y_{n} \end{pmatrix}$$

where
$$I_{n}=x_{n}^2+y_{n}^2$$

I have no idea how to plot that in matlab as a phase-space portrait...

Any help would be great

Related MATLAB, Maple, Mathematica, LaTeX News on Phys.org
kreil
Gold Member
What have you tried?

In general you would compute the derivatives at t=0 on a grid, then plot them as a vector field using the quiver() function.

i've tried, generating a set and points and just sketching it and tried using the ezsurf/surf function to do it... but both ways failed. Does completing the derivative at t=0 the same as n=0?