meshgrid and streamline
4 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!