Quiver

31 次查看(过去 30 天)
John
John 2012-2-25
plot the direction field for dy/dt=(y^2)-ty.
so heres my script:
[T,Y]= meshgrid (-2:.2:2 -2:.2:2);
S= (Y.^2)-(T*Y); L= (??);
quiver(T,Y, ??, ??, ??), axis tight
xlabel 't', ylabel 'y'
title 'Direction Field for dy/dt=y^2-ty'
now, looking up help quiver, the example they used a gradient for the "L" and then used those value(s?) to plug into the third and fourth terms for "quiver". What do I do for the "??"s?

回答(1 个)

Walter Roberson
Walter Roberson 2012-2-25
[FX, FY] = gradient(S);
quiver(T, Y, FX, FY);

类别

Help CenterFile Exchange 中查找有关 Vector Fields 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by