dharmosc.m
来自「Kalman Filtering Theory and Practice, Us」· M 代码 · 共 18 行
M
18 行
function xdot = dharmosc(t,x)
%
% Nonlinear dynamic model for damped harmonic oscillator
% with drifing frequency and damping time-constant
%
% INPUTS
% x is the state vector (4x1)
% OUTPUT
% xdot is its time-derivative
% Nominal values are 1 Hz with 5 sec time constant
% Frequency autocorrelation time constant of 20 sec.
% Damping autocorrelation time constant of 60 sec.
%
xdot = zeros(4,1);
xdot(1) = -x(1)/x(3) + x(4)*x(2);
xdot(2) = -x(4)*x(1) - x(2)/x(3);
xdot(3) = (-x(3)+5)/60;
xdot(4) = (-x(4)+2*pi)/20;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?