Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Who can help me to solve it by Matlab? 2) a) Create a main script and a separate function script which do the following. The

Who can help me to solve it by Matlab?

image text in transcribed

2) a) Create a main script and a separate function script which do the following. The main script should ask the user what the radius of their circle is and what the units of the radius are, and store these. It should then call a function which computes (1) the diameter of the circle, (2) the perimeter of the circle, and (3) the area of the circle. These values should be the output of the function - that is, these values should be returned to the main script. Then, back in the main script, nicely formatted messages should be printed telling the user what the values of the diameter, perimeter, and area of the circle, including the right units b) Write a function script called bisectint.m which accepts as inputs the pmt, loan amount, num of compoundings/pmts per year, and time (in years to payoff loan). The function should return as output (1) the interest rate (as a decimal) that works (or NaN, if no solution), and (2) a string result of 'Success" or "Failure" depending on whether an interest rate was found or not. Please look for your interest rate on the interval [0.00001, .3]. If no solution exists on this interval, assign NaN to the interest rate Notes/hints I) write this function. It will EVENTUALLY be moved into your "loan finance script. This said, your function will be impossible to test without SOME main calling script. II) Please have your bisect code declare "victory" if either your guess gets trapped in an interval smaller than 0.5e-6, or the starting interval may not have a root. III) You should be able to use our bisect.m code and modify it to create your function. Note that your bisect function should not ask the user for inputs because they will arrive in the parentheses of the function call. Nor should your code print out anything because that work will get done (eventually) in ypur main script

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

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

More Books

Students also viewed these Databases questions

Question

data collection discussion n on out on packet plastic surgery cost?

Answered: 1 week ago