Plotting streamlines in an unsteady flow given vector field equation

조회 수: 10 (최근 30일)
How do i input the y equation into matlab to plot the stream lines on the vector field?
am I doing the correct way or is there another way of doing this, thanks for the help
The first picture shows the velocity fileld equaiton and the second picture shows the matlab codes to get the graphs.

채택된 답변

Sam Chak
Sam Chak 2022년 4월 20일
@Kiat Tsen Lim
Since it involves the time dimension, I think you will need to use the quiver3() function.
  댓글 수: 3
Kiat Tsen Lim
Kiat Tsen Lim 2022년 4월 21일
i only need a 2d graph, no need for 3d
Sam Chak
Sam Chak 2022년 4월 21일
Because I thought you want to plot for .
Since t = 0, then you may be looking for this:
[X, Y] = meshgrid(0:10/14:10, -1:11/14:10);
U = 0.4 + 0.9*X;
V = 1.2 - 0.7*Y;
quiver(X, Y, U, V, 1.5)
axis square

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by