I znow problem z matlabem :)

Witam Mam problemik z cwiczonkiem z matlaba. A mianowicie mam zrobic rownanie wahadla metoda eulera. Rownania wygladaja tak: d^2 y/dt^2 = -siny d^2 y/dt^2 = - y skok h wynosi 0,1 warunki brzegowe : y(t=0)=0 dy/dt(t=0)=5 zakres czasowy (0-2s) zrobilem to tak: function ydot=f(y,t),ydot=-sin(y),ydot=y^2-y*sin(t)+cos(t),ydot=-y,endfunction y0=0;y=5;t0=0;t=0:0.1:2; y=ode(y0,t0,t,f) plot(t,y) wychodzi mi taka ucieta sinusoida czy taki zapis jest dobry ? i czy takie cos powinno wyjsc ? prosze o odpowiedz z gory dziekuje

Reply to
Marcin123456
Loading thread data ...

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.