Phase plane of a differential system
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, i'm trying to plot a phase plane but it doesn't work :(
This is the matlab code:
clear all
clc
[X,Y] = meshgrid(0:0.2:5,0:0.2:5);
u = -((3*X)/(2+X))*(Y-X);
v = zeros(26);
figure
quiver(X,Y,u,v);
And matlab answer me: Warning: Matrix is singular to working precision.
Thank you very much for your help !!!
댓글 수: 0
채택된 답변
Star Strider
2015년 5월 5일
You need to do element-wise (array) operations.
Change the ‘u’ assignment to:
u = -((3*X)./(2+X)).*(Y-X);
and it works.
댓글 수: 0
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!