用ode45解微分方程的问题
我想问一下具体怎么使用matlab命令ode45解微分方程?Re:用ode45解微分方程的问题
for detail, you can refer the doc I uploadODE45 is a built in function in MATLAB. This function consists of an automatic step-size Runge-Kutta-Fehlberg integration method which is a combination of a fourth- and fifth-order method. In order to use this function to solve a differential equation, the equation must first be written as a system of first order equations(like equation (1)&(2)). These equations need to be put in a function file, which ODE45 can access. For this example, the function file is call nonlin.m and it contains the following command:
function xdot=nonlin(t,x)
xdot=[0.5*cos(0.5*t)-x(2)-0.5*x(2)^3-0.4*x(1); x(1)]
The function ODE45 also needs to be given an initial time t0, a final time tf, and a column vector of initial conditions x0, as shown in the following main program:
t0=0;
tf=40;
x0=[0,0.05]';
[t,x]=ode45('nonlin',t0,tf,x0);
x1=x(:,1);
x2=x(:,2);
plot(t,x1) % this is the velocity curve
title('Time Vs Velocity')
figure
plot(t,x2) % this is the acceleration curve
title('Time Vs Acceleration')
Re:用ode45解微分方程的问题
An Example of ODE45Re:用ode45解微分方程的问题
谢谢各位:):)
Re:用ode45解微分方程的问题
Search "use matlab to solve differential equations" by using google, you can get enough materials.Re:用ode45解微分方程的问题
请问,在MATLAB里如何解决三维的有限元问题呢?Re:用ode45解微分方程的问题
I developed a 2D truss FEM GUI program in MATLAB.Although it isn't 3D, their principles are the same.
You can also find some 3D FEM programs in the website of Mathworks(Files exchange)
页:
[1]