From: landon donovan on
Hi folks,

i want to plot a 3D vector field. The vectors are stored in
an 2D array. also the starting points are stored in an
array. I decided to use "coneplot" but the problem is, that
i have no clue how to use it...

command line: coneplot(X,Y,Z,U,V,W,Cx,Cy,Cz)

U,V,W has to be a 3D vector according to the manual. i dont
get it. what does it mean. I am somehow not able (probably
too stupid) to adapt the example to my needs.

would be nice if you could help me

greetings
From: us on
"landon donovan" <lutobu(a)gmail.com> wrote in message <hvhfk6$7bq$1(a)fred.mathworks.com>...
> Hi folks,
>
> i want to plot a 3D vector field. The vectors are stored in
> an 2D array. also the starting points are stored in an
> array. I decided to use "coneplot" but the problem is, that
> i have no clue how to use it...
>
> command line: coneplot(X,Y,Z,U,V,W,Cx,Cy,Cz)
>
> U,V,W has to be a 3D vector according to the manual. i dont
> get it. what does it mean. I am somehow not able (probably
> too stupid) to adapt the example to my needs.
>
> would be nice if you could help me
>
> greetings

you must provide a small example of what you have and what you want to get...

us
From: TideMan on
On Jun 19, 4:04 pm, "landon donovan" <lut...(a)gmail.com> wrote:
> Hi folks,
>
> i want to plot a 3D vector field. The vectors are stored in
> an 2D array. also the starting points are stored in an
> array. I decided to use "coneplot" but the problem is, that
> i have no clue how to use it...
>
> command line: coneplot(X,Y,Z,U,V,W,Cx,Cy,Cz)
>
> U,V,W has to be a 3D vector according to the manual. i dont
> get it. what does it mean. I am somehow not able (probably
> too stupid) to adapt the example to my needs.
>
> would be nice if you could help me
>
> greetings

Have you tried this:
help coneplot

You have a 3-D vector field and you cannot figure out what U,V,W are?
Well, I have to agree with your parenthetic statement.
From: landon donovan on
ok if you want to help me and if you CAN help me:
I have the next function to plot with arrows that show the direction of the plot in 3d:

function [h1,h2] = directedplot3(x,c,y,d,varargin)
col=varargin
if nargin < 4, d = []; end
if isempty(d), d = 2; end
if isvector(y), y = y(:); end
if isvector(c), c = c(:); end
[m,n] = size(y);
if isvector(x)
x = x(:);
x = x(:,ones(1,n))
end
k = 2:d:m;
x0 = x(k-1,:)
y0 = y(k-1,:)
c0 = c(1:length(y0))
% u=gradient(x0);
% v=gradient(y0);
u = x(k,:) - x0
v = y(k,:) - y0
w = zeros(length(v),1)
h1 = plot3(x,c,y,varargin{:});
% % [x0,c0,y0]=meshgrid(x0,c0,y0)
% % [u,v,w]=meshgrid(u,v,w)
% % xmin = min(x0(:));
% % xmax = max(x0(:));
% % ymin = min(c0(:));
% % ymax = max(c0(:));
% % zmin = min(y0(:));
% % xrange = linspace(xmin,xmax,16);
% % yrange = linspace(ymin,ymax,16);
% % zrange = 3:4:15;
% % [cx cy cz] = meshgrid(xrange,yrange,zrange);
hold on
h2 = quiver3(x0,c0,y0,u,w,v,0.001,'Color',varargin{:},'MaxHeadSize',0.0001);
%%%h2 = coneplot(x0,c0,y0,u,w,v,5,'nointerp','quiver')%,'Color',varargin{:});
hold on
%set(h2,'Color',varargin{:})
%hold off

I tried to adapt the directedplot function in 2d to 3d but I get very big arrows (in spite I set a MaxHeadSize of almost 0)and when i try to plot many graphs in the same figure I get an overloaded and very ugly plot. As you people can see, i rather tried to draw the arrows as cones using coneplot, but I get an error and thats why I commented that part in this code. PLEASE, ANYBODY, could you help me to draw this arrows correctly so I can get a good directed plot in 3D, or coneplot?
From: abcd on
ok US thank you for nothing