Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB PROBLEM #6 Need Help Writing MATLAB Program For Euler, Heun, and Rugna Kutta Methods Requirements: 1. Write a main function that cycles until user

MATLAB PROBLEM #6

Need Help Writing MATLAB Program For Euler, Heun, and Rugna Kutta Methods

Requirements:

1. Write a main function that cycles until user chooses to stop.

2. Have the user choose the method that will be used, e.g. Euler, Heun or RK4.

3. Use any method of your choice to select one of the following functions to be estimated. Also use any method to input the parameters required before calling the chosen function. a. f1 = 10x^4 -6x the derivative of f1 = 2x^5 -3x^2 -5 b. f2 = 28x^6 -15x^4 +6x^2 -1 the derivative of f2 = 4x^7 - 3x^5 +2x^3 - x

4. This main function will then call one of the three embedded functions:

a. Euler

b. Heun

c. RK4

d. For the 3 above embedded functions: i. Input parameters

1. The derivative function as an autonomous function

2. The initial point

3. Number of points

4. Interval width e.g. h

ii. The output should be a 2xn ( number of points) array of x and y

5. Write a fourth embedded function that computes the actual functions points to compare with the selected method chosen. This function will also output a 2xn array.

6. The main function will then output to the command window the 2 arrays of 2xn points for comparison. This is how to can check your work.

( NOT NEEDED) 7. IMPORTANT (10pts) Run each method at least 2 times with the interval width varied by a significant amount. Then write a short paragraph with table, if required, to comment on the effect of accuracy versus interval width.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions