Write a MATLAB script that will calculate the monthly payment for annual interest rates ranging from 0.5% to 6% in 0.25% increments. The program will prompt the user to enter the principal in dollars and the number of years. Use the following prompts in your script: ‘Enter amount borrowed in dollars: ’ ‘Enter number of years: ’ You will need to convert from number of years to number of months, and from annual interest rate to monthly interest rate. Convert to monthly interest rates by dividing the interest rate by 12. The output report will be printed in MATLAB’s Command Window. Before running your MATLAB program, do the following setup: Set the Command Window screen format by selecting: Preferences, Command Window Numeric Format: short g Numeric Display: loose Tab Size: 0 Apply, OK If needed, expand the Command Window to full screen before executing your program. OUTPUT TABLE FORMAT: **************************************************** STUDENT LOAN PAYMENT CALCULATIONS Enter amount borrowed in dollars: x Enter number of years: x Principal = $xxxxxx Monthly Interest Rate (%) Monthly Payment x.xxxx% xxxx.xx x.xxxx% xxxx.xx x.xxxx% xxxx.xx x.xxxx% xxxx.xx ****************************************************
Write a MATLAB script that will calculate the monthly payment for annual interest rates ranging from 0.5% to 6% in 0.25% increments. The program will prompt the user to enter the principal in dollars and the number of years. Use the following prompts in your script:
‘Enter amount borrowed in dollars: ’
‘Enter number of years: ’
You will need to convert from number of years to number of months, and from annual interest rate to monthly interest rate. Convert to monthly interest rates by dividing the interest rate by 12.
The output report will be printed in MATLAB’s Command Window.
Before running your MATLAB program, do the following setup:
- Set the Command Window screen format by selecting:
Preferences, Command Window
Numeric Format: short g
Numeric Display: loose
Tab Size: 0
Apply, OK - If needed, expand the Command Window to full screen before executing your program.
OUTPUT TABLE FORMAT:
****************************************************
STUDENT LOAN PAYMENT CALCULATIONS
Enter amount borrowed in dollars: x
Enter number of years: x
Principal = $xxxxxx
Monthly Interest Rate (%) Monthly Payment
x.xxxx% xxxx.xx
x.xxxx% xxxx.xx
x.xxxx% xxxx.xx
x.xxxx% xxxx.xx
****************************************************
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images