解高次幂微分方程
本帖最后由 牛小贱 于 2014-3-29 21:21 编辑我做了两个function去解这个方程。大侠们,看这么做对吗?function =odeSolver()
rhs = odeSolver(x,z)
%
% Input
% z: solution variable
% x: derivative variable
%
% Output:
% rhs: right hand side of the ODE
% dz/dx = F(z,x)
rhs = cos(x);
The second one.
function dzdx =ODErhs(x,z)
%
% Input:
% z: vector variable
% x: position
%
% Output:
% dzdx: RHS of the ODE system
dzdx = ;
The third one.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% question7 ODE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Clear memory and screen
clear all; clc
% Data ----------------------------------------
% Interval
a = 0.8;
b = 4.3;
% Initial condition
Z0 = ;
% Computations --------------------------------
% Solve the ODE
sol = ode45(@ODErhs, , Z0);
% Output --------------------------------------
plot(sol.x, sol.y(1,:))
xlabel('x')
ylabel('y')
title('question 7ode')还有就是X,Y两个量的近似解我搞出来了,可是我不懂怎么去求这个 yint。yint是一个以实数形式表示的“y的近似解的积分”原版英文题目解释是这样的。A real number representing the integral of the approximate solution in the intervalwhere the differential equation has been solved.有大侠会吗?求救。感恩。
买看懂的程序,这是你自己编写的 还是从什么地方来的?
高阶微分方程求解方法一般和二阶的都是一样的,用ode45实现就可以了
页:
[1]