Numerical-Methods-with-Applications

버전 1.1.1 (111 MB) 작성자: Emma Smith Zbarsky
Teach numerical methods for interpolation, differentiation, integration, and solving ODEs and PDEs with MATLAB.
다운로드 수: 1.5K
업데이트 날짜: 2024/5/23

Numerical Methods with Applications

View on File Exchange or Open in MATLAB Online

MATLAB Versions Tested

Curriculum Module

Created with R2021b. Compatible with R2021b and later releases.

Information

This curriculum module contains interactive MATLAB® live scripts that teach fundamental concepts and basic terminology related to designing and implementing numerical methods related to interpolation, numerical integration and differentiation, and numerical solutions to ordinary and partial differential equations.

Background

You can use these live scripts as demonstrations in lectures, class activities, or interactive assignments outside class. This module addresses standard topics from a first course in numerical methods including interpolation, numerical integration and derivation, and several numerical solution methods for ODEs and PDEs.

The instructions inside the live scripts will guide you through the exercises and activities. Get started with each live script by running it one section at a time. To stop running the script or a section midway (for example, when an animation is in progress), use the EndIcon.png Stop button in the RUN section of the Live Editor tab in the MATLAB Toolstrip.

Contact Us

Solutions are available upon instructor request. Contact the MathWorks teaching resources team if you would like to request solutions, provide feedback, or if you have a question.

Prerequisites

This module assumes familiarity with basic programming concepts such as floating-point doubles and strings, structures including constants, vectors, matrices, arrays, control flows including if/else, for loops, and while loops, and how to use them in MATLAB. These ideas are all presented with interactive examples in Fundamentals of Programming. This module assumes familiarity with polynomials, derivatives, and integrals. To use the partial differential equation scripts, a student must be familiar with the concepts of partial derivatives and multivariable functions. These scripts do not assume knowledge of analytic solutions to ordinary or partial differential equations.

Getting Started

Accessing the Module

On MATLAB Online:

Use the OpenInMO.png link to download the module. You will be prompted to log in or create a MathWorks account. The project will be loaded, and you will see an app with several navigation options to get you started.

On Desktop:

Download or clone this repository. Open MATLAB, navigate to the folder containing these scripts and double-click on NumerialMethods.prj. It will add the appropriate files to your MATLAB path and open an app that asks you where you would like to start.

Ensure you have all the required products (listed below) installed. If you need to include a product, add it using the Add-On Explorer. To install an add-on, go to the Home tab and select AddOnsIcon.png Add-Ons > Get Add-Ons.

Products

MATLAB® is used throughout. Tools from the Symbolic Math Toolbox™ are used frequently as well.

  • drawpolygon from Image Processing and Computer Vision™ is used to create datasets in Hand.mlx and MeasureLakeArea.mlx
  • Statistics and Machine Learning Toolbox™ and the Curve Fitting Toolbox™ are used in Interpolation.mlx
  • geoplayer from Automated Driving Toolbox™ is used in TrackStorms.mlx to create elegant visualizations, but pedagogically similar plots are demonstrated with geoplot as well.

Scripts

<markdown-accessiblity-table><table class="readme_table"> <thead> <tr> <th align="left" class="readme_th"> <a target="_blank" rel="nofollow noopener noreferrer" rel="nofollow noopener noreferrer" href="https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/blob/release/Images/hand.png"><img src="https://raw.githubusercontent.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/release/Images/hand.png" width="171" alt="hand.png" style="max-width: 100%;"></a> <br> </th> <th align="left" class="readme_th"> <strong>In this script, students will...</strong> <br> <br>- define interpolation and explain how it is different from regression and extrapolation <br>- demonstrate multiple solutions to an interpolation problem, even when interpolating by polynomials <br>- implement three different interpolation functions <br> </th> <th align="left" class="readme_th"> <strong>Applications</strong> <br>- Drawing a smooth rendition of their hand <br>- Tracking the path of a cyclone <br><br> <strong>Scaffolded Template Scripts</strong> <br> <a href="https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/blob/release/./FunctionLibrary/linInterp.m" target="_blank" rel="nofollow noopener noreferrer" rel="nofollow noopener noreferrer"><samp>linInterp.m</samp></a> <br> <a href="https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/blob/release/./FunctionLibrary/pcHInterp.m" target="_blank" rel="nofollow noopener noreferrer" rel="nofollow noopener noreferrer"><samp>pcHInterp.m</samp></a> <br> <a href="https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/blob/release/./FunctionLibrary/pcSpline.m" target="_blank" rel="nofollow noopener noreferrer" rel="nofollow noopener noreferrer"><samp>pcSpline.m</samp></a> <br> </th> </tr> </thead> </table></markdown-accessiblity-table>

Supporting Scripts

<markdown-accessiblity-table><table class="readme_table"> <thead> <tr> <th align="left" class="readme_th"> <a target="_blank" rel="nofollow noopener noreferrer" rel="nofollow noopener noreferrer" href="https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/blob/release/Images/NoisyDerivative.png"><img src="https://raw.githubusercontent.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/release/Images/NoisyDerivative.png" width="171" alt="NoisyDerivative.png" style="max-width: 100%;"></a> <br> </th> <th align="left" class="readme_th"> <strong>In this script, students will...</strong> <br> <br> - determine numerical derivative approximations formulas <br>- use Taylor's theorem to calculate the order of the error for a numerical approximation to a derivative <br> - demonstrate how numerical derivatives can magnify approximation errors <br> </th> <th align="left" class="readme_th"> <strong>Applications</strong> <br>- Numerical solutions to differential equations <br> </th> </tr> </thead> </table></markdown-accessiblity-table> <markdown-accessiblity-table><table class="readme_table"> <thead> <tr> <th align="left" class="readme_th"> <a target="_blank" rel="nofollow noopener noreferrer" rel="nofollow noopener noreferrer" href="https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/blob/release/Images/BakerLakeSR.png"><img src="https://raw.githubusercontent.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/release/Images/BakerLakeSR.png" width="171" alt="BakerLakeSR.png" style="max-width: 100%;"></a> <br> </th> <th align="left" class="readme_th"> <strong>In this script, students will...</strong> <br> <br> - implement Euler's method, Gaussian 2-point approximations, and Simpson's rule for numerical integration <br> - explain why higher-order approximations may not be appropriate in applications <br> </th> <th align="left" class="readme_th"> <strong>Applications</strong> <br> - Measure the area of a lake <br><br> <strong>Scaffolded Template Scripts</strong> <br> <a href="https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Numerical-Methods-with-Applications&amp;project=NumericalMethods.prj&amp;file=FunctionLibrary/eulerMethod.m" rel="nofollow noopener noreferrer" target="_blank" rel="nofollow noopener noreferrer"><samp>eulerMethod.m</samp></a> <br> <a href="https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Numerical-Methods-with-Applications&amp;project=NumericalMethods.prj&amp;file=FunctionLibrary/gauss2pt.m" rel="nofollow noopener noreferrer" target="_blank" rel="nofollow noopener noreferrer"><samp>gauss2pt.m</samp></a> <br> <a href="https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Numerical-Methods-with-Applications&amp;project=NumericalMethods.prj&amp;file=FunctionLibrary/simpsonsRule.m" rel="nofollow noopener noreferrer" target="_blank" rel="nofollow noopener noreferrer"><samp>simpsonsRule.m</samp></a> <br> </th> </tr> </thead> </table></markdown-accessiblity-table>

Supporting Scripts

<markdown-accessiblity-table><table class="readme_table"> <thead> <tr> <th align="left" class="readme_th"> <a target="_blank" rel="nofollow noopener noreferrer" rel="nofollow noopener noreferrer" href="https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/blob/release/Images/image_6.png"><img src="https://raw.githubusercontent.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/release/Images/image_6.png" width="171" alt="image_6.png" style="max-width: 100%;"></a> <br> </th> <th align="left" class="readme_th"> <strong>In this script, students will...</strong> <br> <br> - implement Euler's method for first-order initial value problems <br> - calculate the error of their numerical solution <br> - implement a trapezoidal method <br>- implement a four-step Runge-Kutta method <br> - compare results with the built-in MATLAB solver <samp>ode45</samp> <br> </th> <th align="left" class="readme_th"> <strong>Applications</strong> <br> - Model a pendulum with increasingly realistic assumptions <br><br> <strong>Scaffolded Template Scripts</strong> <br> <a href="https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Numerical-Methods-with-Applications&amp;project=NumericalMethods.prj&amp;file=FunctionLibrary/eulerMethodDE.m" rel="nofollow noopener noreferrer" target="_blank" rel="nofollow noopener noreferrer"><samp>eulerMethodDE.m</samp></a> <br> <a href="https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Numerical-Methods-with-Applications&amp;project=NumericalMethods.prj&amp;file=FunctionLibrary/rk4.m" rel="nofollow noopener noreferrer" target="_blank" rel="nofollow noopener noreferrer"><samp>rk4.m</samp></a> <br> </th> </tr> </thead> </table></markdown-accessiblity-table>

Supporting Scripts

<markdown-accessiblity-table><table class="readme_table"> <thead> <tr> <th align="left" class="readme_th"> <a target="_blank" rel="nofollow noopener noreferrer" rel="nofollow noopener noreferrer" href="https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/blob/release/Images/heatSoln.gif"><img src="https://raw.githubusercontent.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/release/Images/heatSoln.gif" width="171" alt="heatSoln.gif" data-animated-image="" style="max-width: 100%;"></a> <br> </th> <th align="left" class="readme_th"> <strong>In this script, students will...</strong> <br> <br> - identify errors from discretizing the problem and from discretizing the method and choose appropriate parameters to minimize overall error <br> - explain the importance of stability when choosing a numerical method <br> - implement explicit, implicit, and Crank-Nicolson methods to solve a 1-D heat equation <br> </th> <th align="left" class="readme_th"> <strong>Applications</strong> <br> - Solve a heat equation <br><br> <strong>Scaffolded Template Scripts</strong> <br> <a href="https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Numerical-Methods-with-Applications&amp;project=NumericalMethods.prj&amp;file=FunctionLibrary/explicitPDE.m" rel="nofollow noopener noreferrer" target="_blank" rel="nofollow noopener noreferrer"><samp>explicitPDE.m</samp></a> <br> <a href="https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Numerical-Methods-with-Applications&amp;project=NumericalMethods.prj&amp;file=FunctionLibrary/implicitPDE.m" rel="nofollow noopener noreferrer" target="_blank" rel="nofollow noopener noreferrer"><samp>implicitPDE.m</samp></a> <br> <a href="https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Numerical-Methods-with-Applications&amp;project=NumericalMethods.prj&amp;file=FunctionLibrary/cnPDE.m" rel="nofollow noopener noreferrer" target="_blank" rel="nofollow noopener noreferrer"><samp>cnPDE.m</samp></a> <br> </th> </tr> </thead> </table></markdown-accessiblity-table>

License

The license for this module is available in the LICENSE.md.

Related Courseware Modules

<markdown-accessiblity-table><table class="readme_table"> <thead> <tr> <th align="left" class="readme_th"> <strong>Courseware Module</strong> <br> </th> <th align="left" class="readme_th"> <strong>Sample Content</strong> <br> </th> <th align="left" class="readme_th"> <strong>Available on:</strong> <br> </th> </tr> </thead> <tbody> <tr> <td align="left" class="readme_td"> <a href="https://www.mathworks.com/matlabcentral/fileexchange/136364-applied-linear-algebra" rel="nofollow noopener noreferrer" target="_blank" rel="nofollow noopener noreferrer"><strong>Applied Linear Algebra</strong></a> <br> </td> <td align="left" class="readme_td"> <a target="_blank" rel="nofollow noopener noreferrer" rel="nofollow noopener noreferrer" href="https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/blob/release/Images/image_8.png"><img src="https://raw.githubusercontent.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/release/Images/image_8.png" width="171" alt="image_8.png" style="max-width: 100%;"></a> <br> </td> <td align="left" class="readme_td"> <a href="https://www.mathworks.com/matlabcentral/fileexchange/136364-applied-linear-algebra" rel="nofollow noopener noreferrer" target="_blank" rel="nofollow noopener noreferrer"><img src="https://raw.githubusercontent.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/release/Images/OpenInFX.png" width="91" alt="OpenInFX.png" style="max-width: 100%;"></a> <br> <a href="https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Applied-Linear-Algebra&amp;project=AppliedLinAlg.prj" rel="nofollow noopener noreferrer" target="_blank" rel="nofollow noopener noreferrer"><img src="https://raw.githubusercontent.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/release/Images/OpenInMO.png" width="136" alt="OpenInMO.png" style="max-width: 100%;"></a> <br> <a href="https://github.com/MathWorks-Teaching-Resources/Applied-Linear-Algebra" target="_blank" rel="nofollow noopener noreferrer" rel="nofollow noopener noreferrer">GitHub</a> <br> </td> </tr> <tr> <td align="left" class="readme_td"> <br><a href="https://www.mathworks.com/matlabcentral/fileexchange/115905-programming-structuring-code" rel="nofollow noopener noreferrer" target="_blank" rel="nofollow noopener noreferrer"><strong>Programming: Structuring Code</strong></a> <br> Learn how to organize your code into functions, <br> debug, comment, and share <br> </td> <td align="left" class="readme_td"> <a target="_blank" rel="nofollow noopener noreferrer" rel="nofollow noopener noreferrer" href="https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/blob/release/Images/image_11.png"><img src="https://raw.githubusercontent.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/release/Images/image_11.png" width="171" alt="image_11.png" style="max-width: 100%;"></a> <br> </td> <td align="left" class="readme_td"> <br><a href="https://www.mathworks.com/matlabcentral/fileexchange/115905-programming-structuring-code" rel="nofollow noopener noreferrer" target="_blank" rel="nofollow noopener noreferrer"><img src="https://raw.githubusercontent.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/release/Images/OpenInFX.png" width="91" alt="OpenInFX.png" style="max-width: 100%;"></a> <br> <br><a href="https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Programming-Structuring-Code&amp;project=StructuringCode.prj" rel="nofollow noopener noreferrer" target="_blank" rel="nofollow noopener noreferrer"><img src="https://raw.githubusercontent.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/release/Images/OpenInMO.png" width="136" alt="OpenInMO.png" style="max-width: 100%;"></a> <br> <br><a href="https://github.com/MathWorks-Teaching-Resources/Programming-Structuring-Code" target="_blank" rel="nofollow noopener noreferrer" rel="nofollow noopener noreferrer">GitHub</a> <br> </td> </tr> </tbody> </table></markdown-accessiblity-table>

Or feel free to explore our other modular courseware content.

Educator Resources

Contribute

Looking for more? Find an issue? Have a suggestion? Please contact the MathWorks teaching resources team. If you want to contribute directly to this project, you can find information about how to do so in the CONTRIBUTING.md page on GitHub.

© Copyright 2024 The MathWorks™, Inc

인용 양식

Emma Smith Zbarsky (2024). Numerical-Methods-with-Applications (https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/releases/tag/v1.1.1), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2021b
R2021b 이상 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Mathematics and Optimization에 대해 자세히 알아보기
커뮤니티
 Distance Learning 커뮤니티에 더 많은 파일이 있습니다

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.1.1

See release notes for this release on GitHub: https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/releases/tag/v1.1.1

1.1.0

See release notes for this release on GitHub: https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/releases/tag/v1.1.0

1.0.10.0

See release notes for this release on GitHub: https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/releases/tag/v1.0.10

1.0.9.0

See release notes for this release on GitHub: https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/releases/tag/v1.0.9

1.0.8.0

See release notes for this release on GitHub: https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/releases/tag/v1.0.8

1.0.7

See release notes for this release on GitHub: https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/releases/tag/v1.0.7

1.0.6

See release notes for this release on GitHub: https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/releases/tag/v1.0.6

1.0.5

See release notes for this release on GitHub: https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/releases/tag/v1.0.5

1.0.4

See release notes for this release on GitHub: https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/releases/tag/v1.0.4

1.0.3

See release notes for this release on GitHub: https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/releases/tag/v1.0.3

1.0.2

See release notes for this release on GitHub: https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/releases/tag/v1.0.2

1.0.1

See release notes for this release on GitHub: https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications/releases/tag/v1.0.1

1.0.0

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.