[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help Plotting Symbolic Vector Fields with Substitutions

Subject: Re: Help Plotting Symbolic Vector Fields with Substitutions
Date: Tue, 18 Apr 2017 18:23:35 -0700 (PDT)

Hi Mike, and everyone!  After some more hours of digging, and putting puzzle
pieces together, one by one, I was able to  construct another way!It looks
like the key to converting a symbolic function to a form that is usable by
quiver3 is by using function_handle() or equivalently, matlabFunction().  My
corrected code is below:


syms x y z 

phi = atan2(y,x);

r = sqrt(x.^2+y.^2);

trans = [cos(phi), -sin(phi), 0; sin(phi), cos(phi), 0; phi.*0, 0, 1];

cyl = [z ./ r;r; r.^2.*z];

#cyl = [1 ./ r;0; 0];

rec = trans * cyl;

u = matlabFunction(rec(1,1));

v = matlabFunction(rec(2,1));

w = matlabFunction(rec(3,1));

[X,Y,Z] = meshgrid([-1:.5:1]);



View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]