MathWorks - Mobile View
  • MathWorks 㚢㚫㚦㒳㒆への㚵㚤㒳㚤㒳MathWorks 㚢㚫㚦㒳㒆への㚵㚤㒳㚤㒳
  • Access your MathWorks Account
    • マイ アカウント
    • コミュニティのプロファイル
    • ライセンスを関連付ける
    • サインアウト
  • 製品
  • ソリューション
  • アカデミア
  • サポート
  • コミュニティ
  • イベント
  • MATLAB を入手する
MathWorks
  • 製品
  • ソリューション
  • アカデミア
  • サポート
  • コミュニティ
  • イベント
  • MATLAB を入手する
  • MathWorks 㚢㚫㚦㒳㒆への㚵㚤㒳㚤㒳MathWorks 㚢㚫㚦㒳㒆への㚵㚤㒳㚤㒳
  • Access your MathWorks Account
    • マイ アカウント
    • コミュニティのプロファイル
    • ライセンスを関連付ける
    • サインアウト

ビデオ・Webセミナー

  • MathWorks
  • ビデオ
  • ビデオ ホーム
  • 検索
  • ビデオ ホーム
  • 検索
  • 営業へのお問い合わせ
  • 評価版
  Register to watch video
  • Description
  • Full Transcript
  • Code and Resources

Solving ODEs in MATLAB, 9: The MATLAB ODE Suite

From the series: Solving ODEs in MATLAB

Cleve Moler, MathWorks

The MATLAB documentation provides two charts summarizing the features of each of the seven functions in the MATLAB ODE suite.

Related MATLAB code files can be downloaded from MATLAB Central

 

We can get to documentation for the MATLAB ODE Suite by entering this command at the MATLAB prompt-- doc ode45. This will bring us to an extensive documentation for MATLAB ode45 that includes among other things this chart that compares MATLAB ODE solvers. There are seven of them and this compares their various attributes. As we've said before, MATLAB ode45 is the workhorse. It's a nonstiff solver with medium accuracy that is the first one you should try, and we use it most of the time.

I have a soft heart in my heart for MATLAB ode23. It's a nonstiff solver with low accuracy, but its accuracy that's appropriate for graphics work because the step size it chooses is appropriate for most graphics work. MATLAB ode113 we haven't talked about it yet, there could be a comma between the 1 and the 13 here because this is a variable order method where the order varies all the way from 1 to 13. It's a multi-step method that saves history.

If, you know about these things, it's an Adams-Moulton method. I associate this with worked done at Jet Propulsion Laboratory years ago for computing orbits of planets and satellites, which of course are very smooth and go on for years. It can have very high accuracy requirements.

Then there are the stiff solvers. There are four of them-- 15s, 23s, and the twins, the trapezoid rules. 15s is the primary stiff solver, low to medium accuracy. If you find ode45 is slow, taking lots of steps-- indication that the problem is stiff-- try 15s.

23s can be as a low order method, low accuracy, and used at crude error tolerances. We haven't talked about mass matrices. This is where there's a matrix in front of the derivative term, and this can be used with constant mass matrices. And then the two routines with T's in their name are based on the trapezoidal rule, and they're for use with problems without any numerical damping. You can see the documentation for more details on the trapezoid methods.

That's the MATLAB ODE Suite seven solvers, three for nonstiff problems and four for stiff problems. You may well get through with never using anything but ode45 may well serve all your needs.

There's a second chart in the documentation that summarizes all the options that are available through the ODE Set function. We've briefly mentioned the tolerances, RelTol and AbsTol-- the output function-- these are available in all seven of the solvers.

There are various other functions-- various other options-- available for more specialized work, including event handling, providing a Jacobian to the stiff solvers so they don't have to work so hard taking numerical differences, options associated with the mass matrices, providing a limit on the step size. These are all our options that can be specified through ode Set for more specialized work with the ODE solvers.

Download Code and Files

Download the code in this video

Related Products

  • MATLAB

Learn More

Explore more resources from Cleve Moler
Related Information
Learn differential equations

Feedback

Featured Product

MATLAB

  • Request Trial
  • Get Pricing

Up Next:

Throw a rectangular box with sides of three different lengths into the air. You can get the box to tumble stably about its longest axis or its shortest axis. But if you try to make it tumble about it middle axis, you will find the motion is unstable.
9:51
10: Tumbling Box
View full series (12 Videos)

Related Videos:

15:21
Solving ODEs in MATLAB, 1: Euler, ODE1
14:16
Solving ODEs in MATLAB, 11: Predator-Prey Equations
9:51
Solving ODEs in MATLAB, 10: Tumbling Box
10:24
Solving ODEs in MATLAB, 12: Lorenz Attractor and Chaos
5:25
Solving ODEs in MATLAB, 4: Order, Naming Conventions

View more related videos

MathWorks - Domain Selector

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

Select web site

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文Chinese
    • English
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

  • 営業へのお問い合わせ
  • 評価版

製品を見る

  • MATLAB
  • Simulink
  • 学生向けソフトウェア
  • ハードウェア サポート
  • File Exchange
試す、購入する
  • ダウンロード
  • 評価版ソフトウェア
  • 営業へのお問い合わせ
  • 価格とライセンス
使い方を学ぶ
  • ドキュメンテーション
  • チュートリアル
  • MATLAB の例
  • ビデオ・Webセミナー
  • トレーニング

サポートを受ける

  • インストールのヘルプ
  • MATLAB Answers
  • 技術コンサルティング
  • ライセンスセンター
  • サポートへのお問い合わせ

MathWorks について

  • 採用情報
  • ニュースルーム
  • 社会貢献
  • 営業へのお問い合わせ
  • MathWorks について

MathWorks

Accelerating the pace of engineering and science

MathWorksはエンジニアや研究者向け数値解析ソフトウェアのリーディングカンパニーです。

ディスカバー…

  • Select a Web Site United States
  • 特許
  • 商標
  • プライバシー ポリシー
  • 違法コピー防止
  • アプリケーション ステータス

© 1994-2021 The MathWorks, Inc.

  • Facebook
  • Twitter
  • Instagram
  • YouTube
  • LinkedIn
  • RSS

MATLAB を語ろう