亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ode45.m

?? 這是一個整理后比較全面的數(shù)學(xué)建模所用到的基本的十種計算方法的matlab源代碼!
?? M
?? 第 1 頁 / 共 2 頁
字號:
function [tout,yout,varargout] = ode45(odefile,tspan,y0,options,varargin)
%[tout,yout] = ode45('ypfun', tspan, y0, options)
%這里字符串ypfun是用以表示f(t, y)的M文件名,
%tspan=[t0, tfinal]表示自變量初值t0和終值tf
%     y0表示初值向量y0,可選參數(shù)options為用odeset設(shè)置精度等參數(shù)。 
%     輸出列向量tout表示節(jié)點 (t0 , t1 , … , tn)'
%     輸出矩陣yout 表示數(shù)值解,每一列對應(yīng)y的一個分量
%     若無輸出參數(shù),則作出圖形。
%例 解微分方程
%							y' = y-2t/y, y(0)=1, 0<t<1				
%  先寫M函數(shù)quadeg5fun.m
%             function f=quadeg5fun(t,y)
%             f=y-2*t./y;
%             f=f(:);			%保證f為一個列向量
%  再用
%   [t,y]=ode45('quadeg5fun',[0,1],1)
%   plot(t,y); 
%
%ODE45  Solve non-stiff differential equations, medium order method.
%   [T,Y] = ODE45('F',TSPAN,Y0) with TSPAN = [T0 TFINAL] integrates the
%   system of differential equations y' = F(t,y) from time T0 to TFINAL with
%   initial conditions Y0.  'F' is a string containing the name of an ODE
%   file.  Function F(T,Y) must return a column vector.  Each row in
%   solution array Y corresponds to a time returned in column vector T.  To
%   obtain solutions at specific times T0, T1, ..., TFINAL (all increasing
%   or all decreasing), use TSPAN = [T0 T1 ... TFINAL].
%   
%   [T,Y] = ODE45('F',TSPAN,Y0,OPTIONS) solves as above with default
%   integration parameters replaced by values in OPTIONS, an argument
%   created with the ODESET function.  See ODESET for details.  Commonly
%   used options are scalar relative error tolerance 'RelTol' (1e-3 by
%   default) and vector of absolute error tolerances 'AbsTol' (all
%   components 1e-6 by default).
%   
%   [T,Y] = ODE45('F',TSPAN,Y0,OPTIONS,P1,P2,...) passes the additional
%   parameters P1,P2,... to the ODE file as F(T,Y,FLAG,P1,P2,...) (see
%   ODEFILE).  Use OPTIONS = [] as a place holder if no options are set.
%   
%   It is possible to specify TSPAN, Y0 and OPTIONS in the ODE file (see
%   ODEFILE).  If TSPAN or Y0 is empty, then ODE45 calls the ODE file
%   [TSPAN,Y0,OPTIONS] = F([],[],'init') to obtain any values not supplied
%   in the ODE45 argument list.  Empty arguments at the end of the call list
%   may be omitted, e.g. ODE45('F').
%   
%   As an example, the commands
%   
%       options = odeset('RelTol',1e-4,'AbsTol',[1e-4 1e-4 1e-5]);
%       ode45('rigidode',[0 12],[0 1 1],options);
%   
%   solve the system y' = rigidode(t,y) with relative error tolerance 1e-4
%   and absolute tolerances of 1e-4 for the first two components and 1e-5
%   for the third.  When called with no output arguments, as in this
%   example, ODE45 calls the default output function ODEPLOT to plot the
%   solution as it is computed.
%   
%   [T,Y,TE,YE,IE] = ODE45('F',TSPAN,Y0,OPTIONS) with the Events property in
%   OPTIONS set to 'on', solves as above while also locating zero crossings
%   of an event function defined in the ODE file.  The ODE file must be
%   coded so that F(T,Y,'events') returns appropriate information.  See
%   ODEFILE for details.  Output TE is a column vector of times at which
%   events occur, rows of YE are the corresponding solutions, and indices in
%   vector IE specify which event occurred.
%   
%   See also ODEFILE and
%       other ODE solvers:  ODE23, ODE113, ODE15S, ODE23S, ODE23T, ODE23TB
%       options handling:   ODESET, ODEGET
%       output functions:   ODEPLOT, ODEPHAS2, ODEPHAS3, ODEPRINT
%       odefile examples:   ORBITODE, ORBT2ODE, RIGIDODE, VDPODE

%   ODE45 is an implementation of the explicit Runge-Kutta (4,5) pair of
%   Dormand and Prince called variously RK5(4)7FM, DOPRI5, DP(4,5) and DP54.
%   It uses a "free" interpolant of order 4 communicated privately by
%   Dormand and Prince.  Local extrapolation is done.

%   Details are to be found in The MATLAB ODE Suite, L. F. Shampine and
%   M. W. Reichelt, SIAM Journal on Scientific Computing, 18-1, 1997.

%   Mark W. Reichelt and Lawrence F. Shampine, 6-14-94
%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 5.53 $  $Date: 1997/11/21 23:31:04 $

true = 1;
false = ~true;

nsteps = 0;                             % stats
nfailed = 0;                            % stats
nfevals = 0;                            % stats
npds = 0;                               % stats
ndecomps = 0;                           % stats
nsolves = 0;                            % stats

if nargin == 0
  error('Not enough input arguments.  See ODE45.');
elseif ~isstr(odefile) & ~isa(odefile, 'inline')
  error('First argument must be a single-quoted string.  See ODE45.');
end

if nargin == 1
  tspan = []; y0 = []; options = [];
elseif nargin == 2
  y0 = []; options = [];
elseif nargin == 3
  options = [];
elseif ~isempty(options) & ~isa(options,'struct')
  if (length(tspan) == 1) & (length(y0) == 1) & (min(size(options)) == 1)
    tspan = [tspan; y0];
    y0 = options;
    options = [];
    varargin = {};
    msg = sprintf('Use ode45(''%s'',tspan,y0,...) instead.',odefile);
    warning(['Obsolete syntax.  ' msg]);
  else
    error('Correct syntax is ode45(''odefile'',tspan,y0,options).');
  end
end

% Get default tspan and y0 from odefile if none are specified.
if isempty(tspan) | isempty(y0)
  if (nargout(odefile) < 3) & (nargout(odefile) ~= -1)
    msg = sprintf('Use ode45(''%s'',tspan,y0,...) instead.',odefile);
    error(['No default parameters in ' upper(odefile) '.  ' msg]);
  end
  [def_tspan,def_y0,def_options] = feval(odefile,[],[],'init',varargin{:});
  if isempty(tspan)
    tspan = def_tspan;
  end
  if isempty(y0)
    y0 = def_y0;
  end
  if isempty(options)
    options = def_options;
  else
    options = odeset(def_options,options);
  end
end

% Test that tspan is internally consistent.
tspan = tspan(:);
ntspan = length(tspan);
if ntspan == 1
  t0 = 0;
  next = 1;
else
  t0 = tspan(1);
  next = 2;
end
tfinal = tspan(ntspan);
if t0 == tfinal
  error('The last entry in tspan must be different from the first entry.');
end
tdir = sign(tfinal - t0);
if any(tdir * (tspan(2:ntspan) - tspan(1:ntspan-1)) <= 0)
  error('The entries in tspan must strictly increase or decrease.');
end

t = t0;
y = y0(:);
neq = length(y);

% Get options, and set defaults.
rtol = odeget(options,'RelTol',1e-3);
if (length(rtol) ~= 1) | (rtol <= 0)
  error('RelTol must be a positive scalar.');
end
if rtol < 100 * eps 
  rtol = 100 * eps;
  warning(['RelTol has been increased to ' num2str(rtol) '.']);
end

atol = odeget(options,'AbsTol',1e-6);
if any(atol <= 0)
  error('AbsTol must be positive.');
end

normcontrol = strcmp(odeget(options,'NormControl','off'),'on');
if normcontrol
  if length(atol) ~= 1
    error('Solving with NormControl ''on'' requires a scalar AbsTol.');
  end
  normy = norm(y);
else
  if (length(atol) ~= 1) & (length(atol) ~= neq)
    error(sprintf(['Solving %s requires a scalar AbsTol, ' ...
                   'or a vector AbsTol of length %d'],upper(odefile),neq));
  end
  atol = atol(:);
end
threshold = atol / rtol;

% By default, hmax is 1/10 of the interval.
hmax = min(abs(tfinal-t), abs(odeget(options,'MaxStep',0.1*(tfinal-t))));
if hmax <= 0
  error('Option ''MaxStep'' must be greater than zero.');
end
htry = abs(odeget(options,'InitialStep'));
if htry <= 0
  error('Option ''InitialStep'' must be greater than zero.');
end

haveeventfun = strcmp(odeget(options,'Events','off'),'on');
if haveeventfun
  valt = feval(odefile,t,y,'events',varargin{:});
  teout = [];
  yeout = [];
  ieout = [];
end

if nargout > 0
  outfun = odeget(options,'OutputFcn');
else
  outfun = odeget(options,'OutputFcn','odeplot');
end
if isempty(outfun)
  haveoutfun = false;
else
  haveoutfun = true;
  outputs = odeget(options,'OutputSel',1:neq);
end
refine = odeget(options,'Refine',4);    % Necessary for smooth plots.
printstats = strcmp(odeget(options,'Stats','off'),'on');

if strcmp(odeget(options,'Mass','off'),'on') | ...
  strcmp(odeget(options,'MassConstant','off'),'on')
  error(['Solver does not handle mass matrices, M*y'' or M(t)*y''.  '...
         'See ODE15S, ODE23S, ODE23T, or ODE23TB.']);
end

% Set the output flag.
if ntspan > 2
  outflag = 1;                          % output only at tspan points
elseif refine <= 1
  outflag = 2;                          % computed points, no refinement
else
  outflag = 3;                          % computed points, with refinement
  S = (1:refine-1)' / refine;
end

% Allocate memory if we're generating output.
if nargout > 0
  if ntspan > 2                         % output only at tspan points
    tout = zeros(ntspan,1);
    yout = zeros(ntspan,neq);
  else                                  % alloc in chunks
    chunk = max(ceil(128 / neq),refine);
    tout = zeros(chunk,1);
    yout = zeros(chunk,neq);
  end
  nout = 1;
  tout(nout) = t;
  yout(nout,:) = y.';
end

% Initialize method parameters.
pow = 1/5;
A = [1/5; 3/10; 4/5; 8/9; 1; 1];
B = [
    1/5         3/40    44/45   19372/6561      9017/3168       35/384
    0           9/40    -56/15  -25360/2187     -355/33         0
    0           0       32/9    64448/6561      46732/5247      500/1113
    0           0       0       -212/729        49/176          125/192
    0           0       0       0               -5103/18656     -2187/6784
    0           0       0       0               0               11/84
    0           0       0       0               0               0
    ];
E = [71/57600; 0; -71/16695; 71/1920; -17253/339200; 22/525; -1/40];
f = zeros(neq,7);

% The input arguments of odefile determine the args to use to evaluate f.
if nargin(odefile) == 2
  args = {};                            % odefile accepts only (t,y)
else
  args = [{''} varargin];               % use (t,y,'',p1,p2,...)
end

f0 = feval(odefile,t,y,args{:});
nfevals = nfevals + 1;                  % stats
[m,n] = size(f0);
if n > 1
  error([upper(odefile) ' must return a column vector.'])
elseif m ~= neq
  msg = sprintf('an initial condition vector of length %d.',m);
  error(['Solving ' upper(odefile) ' requires ' msg]);
end

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久毛片a| 日日摸夜夜添夜夜添亚洲女人| 亚洲图片自拍偷拍| 国产成人午夜视频| 91精品国产欧美日韩| 中文字幕一区二区三区精华液| 日韩高清欧美激情| 91久久香蕉国产日韩欧美9色| 日韩欧美国产一二三区| 亚洲一区在线视频观看| 成人国产精品免费观看| 久久久精品国产99久久精品芒果| 天天综合天天做天天综合| 99精品欧美一区| 国产清纯美女被跳蛋高潮一区二区久久w | 一区二区三区色| 国产精品18久久久久久久久| 91精品国产综合久久久久| 亚洲免费看黄网站| 不卡电影一区二区三区| 久久精品人人做人人爽97| 久久成人综合网| 日韩一二在线观看| 青青草97国产精品免费观看| 欧美日韩aaa| 亚洲天天做日日做天天谢日日欢 | 欧美精品日日鲁夜夜添| 亚洲一区二区三区四区的| eeuss鲁片一区二区三区| 色综合中文综合网| 国产精品一区二区免费不卡| 欧美xxxxx裸体时装秀| 日韩va欧美va亚洲va久久| 欧美久久久久中文字幕| 天使萌一区二区三区免费观看| 欧美制服丝袜第一页| 亚洲一区在线播放| 欧美精品tushy高清| 日本三级韩国三级欧美三级| 欧美一区日韩一区| 精品影视av免费| 国产欧美日韩精品一区| av电影在线观看完整版一区二区| 国产精品成人网| 欧美影院精品一区| 日本成人在线电影网| www国产成人免费观看视频 深夜成人网| 久久国产剧场电影| 欧美激情在线一区二区| 色综合久久久久综合体桃花网| 玉米视频成人免费看| 欧美中文字幕一区| 九一久久久久久| 亚洲图片欧美激情| 在线综合亚洲欧美在线视频| 国产在线视频精品一区| 亚洲欧美综合网| 91精品国产综合久久福利| 国产成人夜色高潮福利影视| 综合激情成人伊人| 欧美一区二区免费| 99在线精品一区二区三区| 三级亚洲高清视频| 欧美激情一区在线| 日韩一级片在线观看| 99精品一区二区三区| 热久久免费视频| 国产亲近乱来精品视频| 欧美日本视频在线| 成人激情黄色小说| 久久精品av麻豆的观看方式| 成人免费一区二区三区在线观看| 6080国产精品一区二区| 99久免费精品视频在线观看| 青青草原综合久久大伊人精品优势 | 国产精品福利av| 日韩三级.com| 在线视频你懂得一区| 国产乱国产乱300精品| 亚洲成人777| 中文字幕日本乱码精品影院| 欧美成人aa大片| 欧美羞羞免费网站| www.日韩在线| 国内成人精品2018免费看| 亚洲图片欧美综合| 国产精品福利电影一区二区三区四区| 欧美一级一级性生活免费录像| 北岛玲一区二区三区四区| 麻豆国产精品777777在线| 一区二区三区在线视频观看| 久久品道一品道久久精品| 欧美一区二区在线观看| 色婷婷综合久久久中文一区二区| 国产一区二区三区国产| 青青青伊人色综合久久| 亚洲欧美视频一区| 精品对白一区国产伦| 91久久免费观看| 国产一区不卡在线| 麻豆极品一区二区三区| 免费国产亚洲视频| 日韩精品久久理论片| 亚洲成人一区二区在线观看| 亚洲欧美日韩在线| 国产精品久久精品日日| 国产欧美一区在线| 久久婷婷国产综合精品青草| 日韩精品一区二区三区视频| 日韩视频国产视频| 亚洲精品一区二区在线观看| 欧美大片在线观看一区二区| 精品国产乱码久久久久久1区2区| 欧美日韩国产三级| 欧美日韩视频不卡| 欧美喷潮久久久xxxxx| 97久久精品人人澡人人爽| 97久久久精品综合88久久| 色中色一区二区| 欧美午夜在线观看| 91精品在线一区二区| 日韩一区二区电影网| 精品国产乱码久久久久久免费| 日韩美女天天操| 久久久www免费人成精品| 国产精品欧美一区喷水| 亚洲黄色录像片| 亚洲1区2区3区4区| 极品美女销魂一区二区三区免费 | 久久久综合精品| 国产女主播视频一区二区| 国产精品久久久久久久久搜平片 | 欧美一区二区三区公司| 欧美mv日韩mv国产网站app| 久久久久久久电影| 中文字幕免费在线观看视频一区| 欧美国产欧美综合| 亚洲精品一二三| 日本女人一区二区三区| 国产精品12区| 91精品福利在线| 日韩三级在线免费观看| 国产精品午夜春色av| 亚洲综合图片区| 另类综合日韩欧美亚洲| 成人av电影观看| 欧美精品第1页| 国产网站一区二区| 亚洲综合丝袜美腿| 国产精品一色哟哟哟| 色哟哟国产精品| 日韩三级精品电影久久久 | 日韩视频永久免费| 亚洲日本青草视频在线怡红院| 日本人妖一区二区| 国产成人在线影院 | 欧美国产日韩精品免费观看| 亚洲国产日韩a在线播放性色| 国产精品自拍三区| 91福利小视频| 中文字幕欧美激情| 麻豆极品一区二区三区| 在线观看av不卡| 亚洲国产精品成人综合色在线婷婷| 亚洲成av人片在www色猫咪| 成人午夜免费av| 日韩一区二区三区在线观看| 亚洲美女在线国产| 成人综合婷婷国产精品久久 | 91国产成人在线| 国产欧美日韩一区二区三区在线观看| 亚洲自拍另类综合| av动漫一区二区| 精品国产乱码久久| 日韩av在线播放中文字幕| 91在线观看一区二区| 久久久av毛片精品| 久久精品99国产精品| 欧美日韩国产a| 亚洲综合精品久久| 99久久精品国产精品久久| 久久精品亚洲精品国产欧美kt∨ | 95精品视频在线| 国产人妖乱国产精品人妖| 紧缚奴在线一区二区三区| 4438成人网| 一区二区三区不卡视频| 91在线视频在线| 亚洲免费在线播放| av电影在线观看完整版一区二区| 欧美—级在线免费片| 日韩av中文在线观看| 欧美怡红院视频| 亚洲电影一区二区| 欧美日韩国产大片| 午夜精品视频一区| 日韩免费看的电影| 狠狠久久亚洲欧美| 久久色.com| 粉嫩嫩av羞羞动漫久久久|