totally incorrect calculation of matlab
조회 수: 2 (최근 30일)
이전 댓글 표시
I used quiver to plot a vector field. the code was :
[x,y]=meshgrid(0:1:20);
quiver(x,y,x^3-3*x*y,y^3-3*x^2*y)
However the results were completely different from expected, showing downward arrow at x=0, which should have been upward. Other arrows didn't match either.
댓글 수: 0
채택된 답변
Mischa Kim
2014년 12월 10일
편집: Mischa Kim
2014년 12월 10일
Jaein, use instead
[x,y] = meshgrid(0:1:20);
quiver(x,y,x.^3-3*x.*y,y.^3-3*x.^2.*y) % note the dot-notation
댓글 수: 0
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Vector Fields에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!