meshgrid and streamline

4 ビュー (過去 30 日間)
roman
roman 2011 年 10 月 25 日
hello, I have a velocity field u,v,w, where size(u)=size(v)=size(w)=[length(z),length(y),length(z)]. I want to plot streamlines in a horizontal plane so i create the mesh [Y,Z,X]=meshgrid(y,z,x); and I obtain meshgrids with the correct dimensions e.g size(X)=size(u) but when I try to plot with streamslice: streamslice(X,Y,Z,u,v,w,[],[],0.2) where 0.2 is the z-coordinate of the horizontal plane I get this error:
??? Error using ==> interp3 at 138 X, Y and Z must be matrices produced by MESHGRID. Use TriScatteredInterp instead of INTERP3 for scattered data.
Error in ==> streamslice at 147 vi = interp3(x,y,z,v,xi,yi,zi,method);
May you tell me where I am wrong? Thank you very much alberto

回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by