필터 지우기
필터 지우기

How to plot vector field?

조회 수: 3 (최근 30일)
Samaneh Arzpeima
Samaneh Arzpeima 2018년 6월 12일
댓글: KSSV 2018년 6월 13일
Hello Everybody I have 4 vectors x,z,dx,dz which respectively are coordinate of x,coordinate of z, displacement in x direction ,displacement in z direction. I want to plot a vector field graph for displacement, to see the amount and direction of displacement on each point.size of each vector is (110000,1).
What I could think of was
[X,Z]=meshgrid(x(:,1),z(:,1));
D=sqrt(dx.^2+dz.^2);
quiver(X,Z,D,dx)
But didn’t work at all. Any help would be highly appreciated as I am still new to matlab. Thank you in advance
#x,z are evenly spaced, I mean with different intervals.

채택된 답변

KSSV
KSSV 2018년 6월 13일
quiver(x,z,dx,dz)
  댓글 수: 2
Samaneh Arzpeima
Samaneh Arzpeima 2018년 6월 13일
Thank you @KSSV
I did as you said,but its too dense and can not see anything(i attached the file).also when i zoom in to the graph all the arrows have the same direction! the slip(or dislocation) suppose to change the direction after some time.
KSSV
KSSV 2018년 6월 13일
That's the data you had..may be you can skip few data and plot. Also have a look on quiver. YOu can specify the magnitude length etc.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Vector Fields에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by