Curves don't fit to the direction field (value) need help

조회 수: 2 (최근 30일)
aertha13
aertha13 2018년 3월 20일
편집: aertha13 2018년 3월 21일
The curves do not fit to direction.the problem is the values of t and y or linspaces , need help :/
if true
t=0.3:0.2:3; y= -10:0.5:5;
[T, Y]= meshgrid(t,y);
dY= 3.*T.^2.*exp(-T)-T.*Y-Y./T;
dT= ones (size(dY));
quiver (T ,Y ,dT,dY,5)
axis tight
syms t y(t);
eqn = diff(y,t)==3.*t.^2.*exp(-t)-t.*y-y./t;
dsolve(eqn)
hold on
X0=linspace(0.5,3);
X1=linspace(0.5,3);
X2=linspace(0.5,3);
Y0=exp(-X0).*X0.^2-exp(-X0)./X0;
Y1=exp(-X1).*X1.^2+exp(1)-1.*exp(-X1)./X1;
Y2=exp(-X2).*X2.^2+(2.*exp(1)-1).*exp(-X2)./X2;
plot(X0,Y0,X1,Y1,X2,Y2);
hold off
end
  댓글 수: 2
KSSV
KSSV 2018년 3월 21일
What exactly are you trying apart from asap?
aertha13
aertha13 2018년 3월 21일
I need X1 curve to be under the red line so that all curves can show the same direction. But when I change the values, I'm losing the arrows.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by