meshgrid and streamline
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!