Streamslice in polar coordinates problem
2 views (last 30 days)
Show older comments
Hey,
I'm struggling with my code, which should create streamlines of vector field in polar coordinates. I have converted (r, phi) components to normal cartesian coordinates (x,y). Components in terms of (r, phi) were distributed uniformly, it means for r = 0:const:10, phi = 0:const:2*pi. Now I'm trying to compute the streamlines of this vector field using streamslice(x,y,wx,wy), but I get an error:
streamslice(x,y,Gradx,Grady)
Error using griddedInterpolant
Interpolation requires at least two sample points in each
dimension.
Error in interp1 (line 151)
F = griddedInterpolant(X,V,method);
Error in stream2 (line 62)
sxi=interp1(xx(:),1:szu(2),sx(k));
Error in streamslice>nicestreams (line 313)
vertsf = stream2(x,y, u,
v,xstart,ystart,streamoptions);
Error in streamslice (line 138)
[vertsout, avertsout] =
nicestreams(x,y,u,v,density,arrows);
To be detailed, each matrix inside the streamline funtion has dimensions of 201x73.
I also tried to compute a little bit different streamslice:
streamslice(x',y',Gradx',Grady')
which sometimes worked for other people (yes, I've done my "research")... but it gives the same error message.
I also enclose quiver plot of this vector field if it could help someone. If someone helped mi with this problem I would be really grateful. Really, I don't have any idea.
0 Comments
Answers (0)
See Also
Categories
Find more on Vector Fields 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!