Question: Please Help with a MATLAB Code implementation. (PS: Actually, it's not 5 Questions, Please do answer and provide some details for me to understand, please

Please Help with a MATLAB Code implementation. (PS: Actually, it's not 5 Questions, Please do answer and provide some details for me to understand, please i beg )

Task: Use Matlab to realize the bisection method.

Requirements

  • Learn the principle of the bisection method by yourself.
  • Branches, loops, and user-defined functions should be included.
  • Apply the bisection method to acquire the roots of and .
  • The final outputs are the roots of the equations and the number of iterations. Also, the function curves should be plotted.
  • The comment for each statement in your script is necessary.
  • Hand in your report and all your M files.
  1. Principle: Write the principle of the bisection method in detail.
  2. Program Design: How did you design your program? What are the inputs and outputs? How many sections did your program have? How did you design each section? A flow chart is also necessary.
  3. Program Code:
  4. Main program

    Create a data dictionary defining the meanings of all of the variables in your program. For example,

    % a---apple

    % b---banana

    Then write your statements and make sure to add a comment for each statement. For example,

    c=a+b; % to obtain the total amount of apples and bananas

    Function 1

    Comment lines for brief introduction and how to use this function. For example,

    function distance = dist2 (x1, y1, x2, y2)

    %DIST2 Calculate the distance between two points

    % Function DIST2 calculates the distance between

    % two points (x1,y1) and (x2,y2) in a Cartesian coordinate system.

    %

    % Calling sequence:

    % distance = dist2(x1, y1, x2, y2)

    % Define variables:

    % x1 x-position of point 1

    % y1 y-position of point 1

    % x2 x-position of point 2

    % y2 y-position of point 2

    % distance Distance between points

    Statements;% comment

    end

    Function 2

    Function 3

  5. Please Provide Screenshots of program results [The Code Editor with Codes and The function curves OUTPUT)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!