RK4 Method Code

9 visualizzazioni (ultimi 30 giorni)
Sarita March
Sarita March il 14 Dic 2018
Commentato: James Tursa il 14 Dic 2018
I need help with the coding for MATLAB
Problem 1: Consider the following Initial Value Problem (IVP) where ? is the dependent variable and ? is the independent variable: ? ′ = sin(?) ∗ (1 − ?) with ?(0) = ?0 and ? ≥ 0 Note: the analytic solution for this IVP is: ?(?) = 1 + (?0 − 1)?^cos(?)−1
Part 1C: Approximate the solution to the IVP using the RK4 method with the following conditions: Initial condition ?0 = − 1 2 ; time step ℎ = 1 16 ; and time interval ? ∈ [0,20]
+ Plot the RK4 method approximation
+ Plot the absolute error between the approximation and the exact solution using a semilog plot
  1 Commento
James Tursa
James Tursa il 14 Dic 2018
What have you done so far? What specific problems are you having with your code?

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by