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!