请ç»åå§å¼ï¼O(â©_â©)O谢谢ï¼ï¼
æ¯å¦æç»åå§å¼ï¼åå§å¼ï¼Î¸(0)=0.5; θ'(0)=0;
ä¸é¢ç¨y代表θï¼ç¶åï¼å½æ°ç¨åºï¼
function yprime=verderpol(t,y)
global g;
global l;
g=9.8;
l=10;
yprime=[y(2);-g/l*sin(y(1))];
end
主ç¨åºï¼
clc; clear all
global g;
global l;
g=9.8;
l=10;
y0=[0.5;0];%åå§å¼ï¼y(0)=0.5;y'(0)=0;
hold on
[t,y]=ode23('verderpol',[0,3*pi],y0);
plot(t,y(:,1),'r','linewidth',2);
plot(t,y(:,2),'g','linewidth',2);
legend('θ-tå¾','θ''-tå¾')
grid on
hold on
ç»åºçå¾åï¼
å¸ææçåçå¯¹ä½ ææ帮å©ï¼æ»¡ææ¬è¯·é纳åï¼O(â©_â©)O谢谢ï¼