非线性微分方程解

问题描述 投票:0回答:0

我需要帮助在 MATLAB 中求解非线性方程并绘制 x1、x2、x3 相对于时间 (t) 的图。这是我对

ode45
的输入:

dxdt(1) = -p1 * x(1) + x(2).* x(1) + p1 * Gb + D; 
dxdt(2) = -p2 * x(2) + p3 * x(3) + p3 * Ib; 
dxdt(3) = -n * x(3) + n * Ib + u; 

我收到这个错误:

Error using vertcat
Dimensions of arrays being concatenated are not consistent.

Error in Trialsmc>@(t,x)[-(p1+x(2))*x(1)+p1*Gb+D;-p2*x(2)+p3.*x(3),+p3.*Ib;-n*(x(3)-Ib)+u] (line 78)
f = @(t,x) [-(p1 + x(2)) * x(1) + p1 * Gb+ D;

Error in odearguments (line 92) f0 = ode(t0,y0,args{:});   % ODE15I sets args{1} to yp0.

Error in ode45 (line 107) odearguments(odeIsFuncHandle,odeTreatAsMFile, solver_name, ode, tspan, y0, options, varargin);

Error in Trialsmc (line 83) [t,x] = ode45(f, tspan, [x1; x2; x3]);
matlab ode nonlinear-equation
© www.soinside.com 2019 - 2024. All rights reserved.