3D Streamline Example

I have tried writing the same code as provided in the Example of 3 Dimensional Streamline Path with different values but the output which recived is in 2 Dimensional Graph. I also tried to swith on the Z Label from the Toolbar but its not clickable. Can you please check my code and point out the error in it.
load wind;
[startX,startY,startZ]=meshgrid(90,10:10:60,0:5:25);
verts=stream3(x,y,z,u,v,w,startX,startY,startZ);
lineobj=streamline(verts);
xlabel X;
ylabel Y;
zlabel Z;
grid on
lineobj(3).Color= "r";
lineobj(6).Color= "g" ;
lineobj(6).LineWidth= 3;

 采纳的回答

Change the view (which is done in the example code as well) -
load wind;
[startX,startY,startZ]=meshgrid(90,10:10:60,0:5:25);
verts=stream3(x,y,z,u,v,w,startX,startY,startZ);
lineobj=streamline(verts);
xlabel X;
ylabel Y;
zlabel Z;
grid on
lineobj(3).Color= "r";
lineobj(6).Color= "g" ;
lineobj(6).LineWidth= 3;
%Change the view to Default 3D view
view(3)

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Vector Fields 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by