フィルターのクリア

How do you plot arrows in the streamline function ?

26 ビュー (過去 30 日間)
Arthur Melo
Arthur Melo 2014 年 10 月 26 日
回答済み: Chad Greene 2014 年 10 月 29 日
I want get arrows in this streamlines, but I can't use the streamSLICE function because I have only 2d variables, e.g.: only U and V, X and Y. What I have to do ?
I've tried all the possibilities, could you helpe me ? The variables are in the attach file!!
*>> streamline(lon,lat,uwnd,vwnd, startx,starty);*
Error using griddedInterpolant Interpolation requires at least two sample points in each dimension.
Error in interp1 (line 183) F = griddedInterpolant(X,V,method);
Error in stream2 (line 62) sxi=interp1(xx(:),1:szu(2),sx(k));
Error in streamline (line 62) verts = stream2(x,y,u,v,sx,sy,options);
*>> streamslice(lon, lat, uwnd,vwnd, startx,starty,'arrowsmode')*
Error using streamslice (line 137) U,V,W must all be a 3D arrays.
*>> streamslice(lon, lat, uwnd,vwnd,'arrowsmode')*
Error using griddedInterpolant Interpolation requires at least two sample points in each dimension.
Error in interp1 (line 183) F = griddedInterpolant(X,V,method);
Error in stream2 (line 62) sxi=interp1(xx(:),1:szu(2),sx(k));
Error in streamslice>nicestreams (line 297) vertsf = stream2(x,y, u, v,xstart,ystart,streamoptions);
Error in streamslice (line 133) [vertsout, avertsout] = nicestreams(x,y,u,v,density,arrows);
  3 件のコメント
Arthur Melo
Arthur Melo 2014 年 10 月 26 日
Please, read again the question, I improved it.
Star Strider
Star Strider 2014 年 10 月 26 日
The variables.mat file will help. If it does not contain ‘stream2.m’, it would also help if you uploaded and attached your ‘stream2.m’ file. It will tell us what you are doing and will put the errors into context.

サインインしてコメントする。

回答 (1 件)

Chad Greene
Chad Greene 2014 年 10 月 29 日
If the problem is that streamslice wants data in 3D and you only have 2D data, why not make up some fake z data?
z = ones(size(lon));
w = zeros(size(z);
Or, a couple of submissions on FEX might be close to what you're looking for. StreakArrow and Curvvec, for example?

カテゴリ

Help Center および File ExchangeVector Fields についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by