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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ode45.m

?? 這是一個整理后比較全面的數(shù)學建模所用到的基本的十種計算方法的matlab源代碼!
?? M
?? 第 1 頁 / 共 2 頁
字號:
hmin = 16*eps*abs(t);
if isempty(htry)
  % Compute an initial step size h using y'(t).
  absh = min(hmax, abs(tspan(next) - t));
  if normcontrol
    rh = (norm(f0) / max(normy,threshold)) / (0.8 * rtol^pow);
  else
    rh = norm(f0 ./ max(abs(y),threshold),inf) / (0.8 * rtol^pow);
  end
  if absh * rh > 1
    absh = 1 / rh;
  end
  absh = max(absh, hmin);
else
  absh = min(hmax, max(hmin, htry));
end
f(:,1) = f0;

% Initialize the output function.
if haveoutfun
  feval(outfun,[t tfinal],y(outputs),'init');
end

% THE MAIN LOOP

done = false;
while ~done
  
  % By default, hmin is a small number such that t+hmin is only slightly
  % different than t.  It might be 0 if t is 0.
  hmin = 16*eps*abs(t);
  absh = min(hmax, max(hmin, absh));    % couldn't limit absh until new hmin
  h = tdir * absh;
  
  % Stretch the step if within 10% of tfinal-t.
  if 1.1*absh >= abs(tfinal - t)
    h = tfinal - t;
    absh = abs(h);
    done = true;
  end
  
  % LOOP FOR ADVANCING ONE STEP.
  nofailed = true;                      % no failed attempts
  while true
    hA = h * A;
    hB = h * B;
    f(:,2) = feval(odefile, t + hA(1), y + f*hB(:,1), args{:});
    f(:,3) = feval(odefile, t + hA(2), y + f*hB(:,2), args{:});
    f(:,4) = feval(odefile, t + hA(3), y + f*hB(:,3), args{:});
    f(:,5) = feval(odefile, t + hA(4), y + f*hB(:,4), args{:});
    f(:,6) = feval(odefile, t + hA(5), y + f*hB(:,5), args{:});
    tnew = t + hA(6);
    ynew = y + f*hB(:,6);
    f(:,7) = feval(odefile, tnew, ynew, args{:});
    nfevals = nfevals + 6;              % stats
    
    % Estimate the error.
    if normcontrol
      normynew = norm(ynew);
      err = absh * (norm(f * E) / max(max(normy,normynew),threshold));
    else
      err = absh * norm((f * E) ./ max(max(abs(y),abs(ynew)),threshold),inf);
    end
    
    % Accept the solution only if the weighted error is no more than the
    % tolerance rtol.  Estimate an h that will yield an error of rtol on
    % the next step or the next try at taking this step, as the case may be,
    % and use 0.8 of this value to avoid failures.
    if err > rtol                       % Failed step
      nfailed = nfailed + 1;            % stats
      if absh <= hmin
        msg = sprintf(['Failure at t=%e.  Unable to meet integration ' ...
                       'tolerances without reducing the step size below ' ...
                       'the smallest value allowed (%e) at time t.\n'],t,hmin);
        warning(msg);
        if haveoutfun
          feval(outfun,[],[],'done');
        end
        if printstats                   % print cost statistics
          fprintf('%g successful steps\n', nsteps);
          fprintf('%g failed attempts\n', nfailed);
          fprintf('%g function evaluations\n', nfevals);
          fprintf('%g partial derivatives\n', npds);
          fprintf('%g LU decompositions\n', ndecomps);
          fprintf('%g solutions of linear systems\n', nsolves);
        end
        if nargout > 0
          tout = tout(1:nout);
          yout = yout(1:nout,:);
          if haveeventfun
            varargout{1} = teout;
            varargout{2} = yeout;
            varargout{3} = ieout;
            varargout{4} = [nsteps; nfailed; nfevals; npds; ndecomps; nsolves];
          else
            varargout{1} = [nsteps; nfailed; nfevals; npds; ndecomps; nsolves];
          end
        end
        return;
      end
      
      if nofailed
        nofailed = false;
        absh = max(hmin, absh * max(0.1, 0.8*(rtol/err)^pow));
      else
        absh = max(hmin, 0.5 * absh);
      end
      h = tdir * absh;
      done = false;
      
    else                                % Successful step
      break;
      
    end
  end
  nsteps = nsteps + 1;                  % stats
  
  if haveeventfun
    [te,ye,ie,valt,stop] = ...
        odezero('ntrp45',odefile,valt,t,y,tnew,ynew,t0,varargin,h,f);
    nte = length(te);
    if nte > 0
      if nargout > 2
        teout = [teout; te];
        yeout = [yeout; ye.'];
        ieout = [ieout; ie];
      end
      if stop                           % stop on a terminal event
        tnew = te(nte);
        ynew = ye(:,nte);
        done = true;
      end
    end
  end
  
  if nargout > 0
    oldnout = nout;
    if outflag == 3                     % computed points, with refinement
      nout = nout + refine;
      if nout > length(tout)
        tout = [tout; zeros(chunk,1)];  % requires chunk >= refine
        yout = [yout; zeros(chunk,neq)];
      end
      i = oldnout+1:nout-1;
      tout(i) = t + (tnew-t)*S;
      yout(i,:) = ntrp45(tout(i),t,y,[],[],h,f).';
      tout(nout) = tnew;
      yout(nout,:) = ynew.';
    elseif outflag == 2                 % computed points, no refinement
      nout = nout + 1;
      if nout > length(tout)
        tout = [tout; zeros(chunk,1)];
        yout = [yout; zeros(chunk,neq)];
      end
      tout(nout) = tnew;
      yout(nout,:) = ynew.';
    elseif outflag == 1                 % output only at tspan points
      while next <= ntspan
        if tdir * (tnew - tspan(next)) < 0
          if haveeventfun & done
            nout = nout + 1;
            tout(nout) = tnew;
            yout(nout,:) = ynew.';
          end
          break;
        elseif tnew == tspan(next)
          nout = nout + 1;
          tout(nout) = tnew;
          yout(nout,:) = ynew.';
          next = next + 1;
          break;
        end
        nout = nout + 1;                % tout and yout are already allocated
        tout(nout) = tspan(next);
        yout(nout,:) = ntrp45(tspan(next),t,y,[],[],h,f).';
        next = next + 1;
      end
    end
    
    if haveoutfun
      i = oldnout+1:nout;
      if ~isempty(i) & (feval(outfun,tout(i),yout(i,outputs).') == 1)
        tout = tout(1:nout);
        yout = yout(1:nout,:);
        if haveeventfun
          varargout{1} = teout;
          varargout{2} = yeout;
          varargout{3} = ieout;
          varargout{4} = [nsteps; nfailed; nfevals; npds; ndecomps; nsolves];
        else
          varargout{1} = [nsteps; nfailed; nfevals; npds; ndecomps; nsolves];
        end
        return;
      end
    end
    
  elseif haveoutfun
    if outflag == 3                     % computed points, with refinement
      tinterp = t + (tnew-t)*S;
      yinterp = ntrp45(tinterp,t,y,[],[],h,f);
      if feval(outfun,[tinterp; tnew],[yinterp(outputs,:), ynew(outputs)]) == 1
        return;
      end
    elseif outflag == 2
      if feval(outfun,tnew,ynew(outputs)) == 1
        return;
      end
    elseif outflag == 1                 % output only at tspan points
      ninterp = 0;
      while next <= ntspan 
        if tdir * (tnew - tspan(next)) < 0
          if haveeventfun & done
            ninterp = ninterp + 1;
            tinterp(ninterp,1) = tnew;
            yinterp(:,ninterp) = ynew;
          end
          break;
        elseif tnew == tspan(next)
          ninterp = ninterp + 1;
          tinterp(ninterp,1) = tnew;
          yinterp(:,ninterp) = ynew;
          next = next + 1;
          break;
        end
        ninterp = ninterp + 1;
        tinterp(ninterp,1) = tspan(next);
        yinterp(:,ninterp) = ntrp45(tspan(next),t,y,[],[],h,f);
        next = next + 1;
      end
      if ninterp > 0
        if feval(outfun,tinterp(1:ninterp),yinterp(outputs,1:ninterp)) == 1
          return;
        end
      end
    end
  end
  
  % If there were no failures compute a new h.
  if nofailed
    % Note that absh may shrink by 0.8, and that err may be 0.
    temp = 1.25*(err/rtol)^pow;
    if temp > 0.2
      absh = absh / temp;
    else
      absh = 5.0*absh;
    end
  end
  
  % Advance the integration one step.
  t = tnew;
  y = ynew;
  if normcontrol
    normy = normynew;
  end
  f(:,1) = f(:,7);                      % Already evaluated odefile(tnew,ynew)
  
end

if haveoutfun
  feval(outfun,[],[],'done');
end

if printstats                           % print cost statistics
  fprintf('%g successful steps\n', nsteps);
  fprintf('%g failed attempts\n', nfailed);
  fprintf('%g function evaluations\n', nfevals);
  fprintf('%g partial derivatives\n', npds);
  fprintf('%g LU decompositions\n', ndecomps);
  fprintf('%g solutions of linear systems\n', nsolves);
end

if nargout > 0
  tout = tout(1:nout);
  yout = yout(1:nout,:);
  if haveeventfun
    varargout{1} = teout;
    varargout{2} = yeout;
    varargout{3} = ieout;
    varargout{4} = [nsteps; nfailed; nfevals; npds; ndecomps; nsolves];
  else
    varargout{1} = [nsteps; nfailed; nfevals; npds; ndecomps; nsolves];
  end
end

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜臀久久久久久久| 激情偷乱视频一区二区三区| 欧美视频第二页| 亚洲综合成人在线视频| 色婷婷综合五月| 亚洲精品菠萝久久久久久久| 91丨九色丨蝌蚪丨老版| 久久精品在线免费观看| 久草在线在线精品观看| 久久天堂av综合合色蜜桃网 | 欧美日韩精品三区| 无码av中文一区二区三区桃花岛| 欧美日韩久久久一区| 日韩成人av影视| 91精品国产黑色紧身裤美女| 日本亚洲免费观看| 欧美成人三级在线| 日韩成人免费电影| 欧美精品一区二区三区蜜桃 | 欧美性猛交xxxx黑人交| 性久久久久久久久久久久| 欧美午夜电影网| 日日噜噜夜夜狠狠视频欧美人| 久久久精品免费免费| 不卡在线观看av| 亚洲免费在线视频| 欧美男男青年gay1069videost | a级精品国产片在线观看| 一区二区三区自拍| 欧美福利视频导航| 激情六月婷婷久久| 中文字幕一区二区三区在线观看| 在线观看欧美日本| 久久精品国产色蜜蜜麻豆| 国产精品网站一区| 欧美精品久久久久久久久老牛影院| 久久国产生活片100| 亚洲欧洲国产日韩| 777久久久精品| 国产成人亚洲综合a∨婷婷| 亚洲综合丝袜美腿| www国产成人免费观看视频 深夜成人网| 99精品久久99久久久久| 日韩av在线发布| 中文字幕日韩精品一区| 日韩欧美的一区| 色综合久久综合| 九九精品视频在线看| 亚洲少妇最新在线视频| 日韩免费高清av| 91免费观看在线| 理论片日本一区| 亚洲精品视频一区| 欧美精品一区男女天堂| 在线看不卡av| 懂色av一区二区三区蜜臀| 亚洲成av人影院| 国产精品毛片久久久久久久| 欧美一区2区视频在线观看| 菠萝蜜视频在线观看一区| 日本系列欧美系列| 亚洲精品大片www| 久久久久国产成人精品亚洲午夜| 在线免费观看一区| 国产不卡高清在线观看视频| 日韩精品视频网站| 国产精品久久久久久亚洲毛片| 91精品国产色综合久久ai换脸| 成a人片国产精品| 国产综合色在线| 偷窥少妇高潮呻吟av久久免费| 国产精品护士白丝一区av| 欧美白人最猛性xxxxx69交| 在线视频亚洲一区| 丰满少妇久久久久久久| 蜜臀av性久久久久蜜臀aⅴ四虎| 一区二区三区精品| 国产精品伦一区| 久久综合色一综合色88| 日韩区在线观看| 欧美日韩在线播| 色天天综合色天天久久| 成人18视频在线播放| 国产精品91xxx| 久久精品国产澳门| 亚洲成人黄色小说| 亚洲免费电影在线| 国产精品久久久久久久久快鸭 | 欧美日韩一区二区欧美激情| 色欲综合视频天天天| 成人av在线影院| 国产露脸91国语对白| 美女一区二区视频| 图片区日韩欧美亚洲| 亚洲国产精品视频| 尤物在线观看一区| 亚洲美女视频在线观看| 国产精品久久久久aaaa樱花| 国产亚洲欧美一区在线观看| 久久综合色婷婷| 精品免费国产二区三区| 日韩一区二区免费视频| 欧美丰满少妇xxxbbb| 欧美日韩久久久久久| 欧美视频三区在线播放| 欧美性受xxxx黑人xyx性爽| 91久久一区二区| 色悠久久久久综合欧美99| 91麻豆免费观看| 久久看人人爽人人| 精品久久久久一区二区国产| 日韩午夜电影av| 日韩欧美一区二区三区在线| 欧美一区二区三区视频免费| 欧美一卡二卡在线| 欧美大片一区二区| 精品国产伦一区二区三区观看方式 | 91精品国产黑色紧身裤美女| 欧美一区二区三区性视频| 欧美一级黄色大片| 精品国产伦一区二区三区免费| 久久久三级国产网站| 国产精品色哟哟| 亚洲天堂中文字幕| 亚洲精品高清视频在线观看| 亚洲最新在线观看| 亚洲国产精品一区二区久久恐怖片| 五月婷婷久久综合| 看国产成人h片视频| 国产精品99久久久久久宅男| 成人午夜精品在线| 99久久久国产精品免费蜜臀| 93久久精品日日躁夜夜躁欧美| 91片在线免费观看| 欧美日韩亚洲综合在线| 日韩视频在线你懂得| 久久亚洲一级片| 国产精品久久毛片a| 亚洲黄色录像片| 日韩影院免费视频| 国内精品第一页| 成人综合在线观看| 91精品1区2区| 日韩三级视频中文字幕| 久久久亚洲国产美女国产盗摄 | 91欧美激情一区二区三区成人| 欧美性大战久久久久久久| 日韩视频123| 欧美激情综合在线| 一区二区三区四区在线播放 | 国产福利精品一区二区| 91蜜桃网址入口| 欧美日韩1234| 欧美精品一区视频| 亚洲三级视频在线观看| 视频一区欧美精品| 狠狠色丁香久久婷婷综合_中| 高清av一区二区| 欧美亚洲一区二区在线| 欧美成va人片在线观看| 99久久夜色精品国产网站| 欧美日本一区二区三区四区| 欧美精品一区二区久久婷婷| 成人免费一区二区三区在线观看| 亚洲成av人**亚洲成av**| 国模冰冰炮一区二区| 日本精品一区二区三区高清| 日韩小视频在线观看专区| 国产精品美日韩| 天天亚洲美女在线视频| 国产激情一区二区三区| 欧洲生活片亚洲生活在线观看| 精品久久久久久久一区二区蜜臀| 综合av第一页| 麻豆91精品91久久久的内涵| 色综合久久综合| 26uuu色噜噜精品一区二区| 亚洲最新视频在线观看| 国产精品一线二线三线精华| 欧美丝袜丝nylons| 国产色综合一区| 视频在线观看91| 成人v精品蜜桃久久一区| 日韩视频免费观看高清完整版| 亚洲色图在线看| 久久99精品久久久久久久久久久久 | 精品国产免费人成在线观看| 夜夜嗨av一区二区三区中文字幕| 精品一区二区三区免费| 欧美专区日韩专区| 国产农村妇女毛片精品久久麻豆| 无码av免费一区二区三区试看| www.日韩在线| 日韩精品在线一区| 亚洲狠狠爱一区二区三区| 成人免费观看av| 日韩三级视频在线看| 亚洲国产中文字幕在线视频综合| 成人三级伦理片| 精品国产乱码久久久久久牛牛|