Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: ode45 help
Replies: 2   Last Post: Dec 7, 2012 9:13 AM

 Messages: [ Previous | Next ]
 Torsten Posts: 1,717 Registered: 11/8/10
Re: ode45 help
Posted: Oct 16, 2012 6:59 AM

On 16 Okt., 11:06, "mojtaBa malekpour" <mojy691...@yahoo.com> wrote:
> why matlab can't solve this?
>
> function dy = ffffd(t,y)
> dy = zeros(4,1);    % a column vector
> dy(1) =y(2);
> dy(2) =-81276055.762*cos(atan((0.05*sin(523.5988*t)+0.12*sin(y(3)))/(-y(1)+0.05*c­os(523.5988*t)+0.12*cos(y(3)))))*([[y(1)-0.05*cos(523.5988*t)-0.12*cos(y(3)­)]^2+[0.05*sin(523.5988*t)+0.12*sin(y(3))]^2]^0.5-0.0005)^1.5;
> dy(3) =y(4);
> dy(4) =171687.934*sin(y(3)-523.5988*t)+1357293887.572*sin(y(3)-atan((0.05*sin(523­.5988*t)+0.12*sin(y(3)))/(-y(1)+0.05*cos(523.5988*t)+0.12*cos(y(3)))))*([[y­(1)-0.05*cos(523.5988*t)-0.12*cos(y(3))]^2+[0.05*sin(523.5988*t)+0.12*sin(y­(3))]^2]^0.5-0.0005)^1.5+122.868*cos(y(3));
>
> [T,Y] = ode45(@ffffd,[0 2.784],[0.1705 0 0 0]);

Integrate up to 1.75e-3 and look whether the results obtained so far
look reasonable (I doubt it).

Best wishes
Torsten.

Date Subject Author
10/16/12 mojtaBa malekpour
10/16/12 Torsten
12/7/12 Kristin