Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program: assign04a.m Write a MATLAB script file that uses principal (or amount), rate of interest, and time to compute and display the simple interest with

image text in transcribed
image text in transcribed
image text in transcribed
Program: assign04a.m Write a MATLAB script file that uses principal (or amount), rate of interest, and time to compute and display the simple interest with appropriate labeling. Ask the user to enter the rate within requested range; continue ONLY if rate is within range. Ask the user for the principle amount and number of years. Problem CONSTANTS: (with units) none Problem Inputs: (with units) principle entered by user dollars interest rate entered by user percent time entered by user years Problem Outputs: (with units) simple interest dollars Other variables: (with units) minimum and maximum rates percent Equation: See above. Algorithm: See green comments below. Type the green comments as GIVEN in the editor window and use as a guide for lyping the MATLAB statements. Run output: See below Start your progrym file by typing the following into your empty tditor window. Type yours/your group and other required information comments Type the algorithm as given below as comments to guide you when writing the MATLAB instructions to do the tasks to solve the given problem. Below the comment, type the MATLAB statement(s) that o what the comment says. This example should help. NO error checking. Do not use commands and statements beyond what has been taught on class Do not use commands and statements in assignol until they have been discussed in class. submitter's name, GROUP or none other group members' names or none program file name due date of the assignment statement(s) about collaboration. See syllabus for examples. a short narrative about what the file does New commands: if...else to check for error relational, logical operators num2str() Continue: input format bank, compact disp() clc, clear all format bank format Compact Type yours/your group and other required information comments. Type the algorithm as given below as comments to guide you when writing the MATLAB instructions to do the tasks to solve the given problem. . Below the comment, type the MATLAB statement(s) that o what the comment says. This example should help. Do not use commands and statements beyond what has been taught on class. Do not use commands and statements in assign01 until they have been discussed in class. + submitter's name, GROUP # or none other group members' names or none # program file name due date of the assignment statement(s) about collaboration. See syllabus for examples. # a short narrative about what the file does New commands: if...else to check for error relational, logical operators num2 str() Continue: input() format bank, compact disp() clc, clear all format bank format compact 8 ***** INPUT ***** #ask user to enter the minimum and maximum interest rates #ask user to enter interest rate range and rate within range # 1f rate not within the rate range, display message and and execution # rate is good # get principle and time ZERO POINTS for variables if instructor rules not followed and code clarity if instructions are not followed See rubric. # ***** COMPUTE ***** * compute simple interest ($) # ***** OUTPUT ***** * display principle, time, rate and interest with labels on same line Program: assign04b.m Modify assign04a to re-ask used for a rate it is not wihin range Remove or modify statements and comments not relevant to current requirements Problem CONSTANTS: (with units) Sane as assignola Problem Inputs: (with units) Problem Outputs: (with units) Other variables: (with units) Equation: Algorithm: NO error checking. Do not use commands and statements beyond what has been taught on class. Do not use commands and statements in assign01 until they have been discussed in class Sample output: Enter the low value for the rate range: 4 Enter the maximum value for the rate range: 5 Enter rate of interest 4-51 inclusive: 6 Enter rate of interest 4-58 inclusive: 1 Enter rate of interest 4-51 inclusivet 4 Enter amount of loan: 4000 Enter number of years: 4 New commands: while data validation loop Continue: relational, logical operators num2 str() format bank, compact disp() Use descriptive variables. Loan summary: Principlet $4000 Interest ratet Time: 4 years Simple interest: $640

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

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions