decay1.m
来自「matlab programming for engineers(2nd)书籍源」· M 代码 · 共 24 行
M
24 行
function yprime = decay1(t,y)
%DECAY1 Calculates the decay rates of Thorium 227 and Radium 223.
% Function DECAY1 Calculates the rates of change of Thorium 227
% and Radium 223 (yprime) for a given current concentration y.
% Define variables:
% t -- Time (in days)
% y -- Vector of current concentrations
%
% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 03/15/07 S. J. Chapman Original code
% Set decay constants.
lambda_th = 0.03710636;
lambda_ra = 0.0606428;
% Calculate rates of decay
yprime = zeros(2,1);
yprime(1) = -lambda_th * y(1);
yprime(2) = -lambda_ra * y(2) + lambda_th * y(1);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?