drawing phase portrait given phase and magnitude (not ODEs)

3 Ansichten (letzte 30 Tage)
Hussein
Hussein am 24 Nov. 2017
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!

Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by