MATLAB Answers

Visualize a vector field function with matlab

조회 수: 3(최근 30일)
Felix Richter
Felix Richter 2021년 9월 18일 17:16
댓글: Felix Richter 2021년 9월 18일 17:50
Hello,
I am trying to visualize the vector field function
F(x,y,z) = xz * i + xy * j + 3xz * k
with Matlab (2020b).
I tried quiver3, but the examples were not really helpful.
Thanks in advance for help!
Best,
Felix

채택된 답변

the cyclist
the cyclist 2021년 9월 18일 17:31
x = -3 : 0.5 : 3;
y = -3 : 0.5 : 3;
z = -3 : 0.5 : 3;
[xx,yy,zz] = meshgrid(x,y,z);
Fx = xx.*zz;
Fy = xx.*yy;
Fz = 3*xx.*zz;
figure
quiver3(xx,yy,zz,Fx,Fy,Fz)
  댓글 수: 1
Felix Richter
Felix Richter 2021년 9월 18일 17:50
Alright, thank you very much!

댓글을 달려면 로그인하십시오.

추가 답변(0개)

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by