drawing phase portrait given phase and magnitude (not ODEs)

1 view (last 30 days)
I'm trying to plot the arrows in a 2D plane that corresponding to the complex number
f(x,y) = f0(x,y)e^(-i*phi(x,y))
Now, I know how to use quiver(x,y,u,v) if I had, say a 2D ode system, xdot = y and ydot = v, but I'm not sure how to go about doing it if I just have the magnitude and phase of a complex number.
For instance let's say f0(x,y) = 1 and I have a function phi(x,y) = h(x)*x+ g(y)*y, how would I use quiver to accomplish a 2D phase portrait?
I don't think the following works, does it?
[x,y] = meshgrid(-1:0.1:1,-1:0.1:1);
u = g(x)*x;
v = h(y)*y;
quiver(x,y,u,v)
Would appreciate any help, thanks in advance!

Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!