1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mr Goodwill [35]
3 years ago
10

Program: assign03a.m Write a MATLAB script file that uses principal (or amount), rate of interest, and time to compute and displ

ay the simple interest with appropriate labeling. Create a vector of rates using the following information entered from user. Ask the user to enter the low and high values for the rate range and the number of rates. Ask the user for the number of years.

Mathematics
1 answer:
DochEvi [55]3 years ago
4 0

Answer:

The code is given in the answer along with the algorithm and explanation. The output and the workspace variables are also attached as screen shots.

Step-by-step explanation:

The basic algorithm of the code is as follows:

  1. Clear the workspace, command window and prepare the format as banking.
  2. Set the constant value of principal amount, this is fixed as 4000 in the code and can be changed.
  3. Ask the user to enter the value of lowest interest rate , highest interest rate , number of interest rate  values and number of years.
  4. Create the interest rate vector.
  5. For each entry of the interest rate vector, calculate the interest.
  6. Display the each entry of interest rate and the simple calculated interest.
  7. Calculate the average rate of interest and the average interest and display them.

The code is here as follows

%% Preparing the formats

clc,clear all;%Clearing command line and workspace

format bank%Formatting

format compact%Formatting

%% Setting the constants

PRINCIPAL = 4000;%Principal amount fixed as 4000.

%% Taking inputs from the user

low_val = input('Enter the low value for the rate range: ');%Lowest value of the interest

high_val = input('Enter the high value for the rate range: ');%Highest value of the interest

rate_vals = input('Enter the number of rate values including high and low values: '); %Total number of rate values

year = input('Enter number of years: ');% Number of years

%% Creating the interest vectors

rate = linspace(low_val,high_val,rate_vals);%Creating the vector

%% Initializing the array

simple_interest=zeros(length(rate),1);%initializing the array to hold the simple interest

%% Displaying the interest rate vectors

fprintf('\t\t Rate(%%)\t\tInterest($)\n');%Displaying the  interest rate and interest heading

%% Calculating the interest vectors

for i = 1:length(rate)

   simple_interest(i) = (rate(i)*year*PRINCIPAL)/100;%Calculating Simple rate of interest for a given rate over the principal amount

fprintf('\t\t %.2f\t\t\t%.2f\n',rate(i),simple_interest(i));% Displaying each entry  interest rate and interest

end

%% Calculating and printing the average interest

fprintf('Average: Rate(%%)\t\tInterest($)\n');%Displaying the heading for average rate and interest

fprintf('\t\t %.2f\t\t\t%.2f\n',mean(rate),mean(simple_interest));%Calculating and displaying the average interest.

You might be interested in
Brainliest + Points!
andre [41]

Answer:

Step-by-step explanation:

since you are already given the formula just plug in the numbers.

the only tricky part is r=rate must be in decimal form!!!

I=4,000(.035)(2)

I=280 (answer)

8 0
3 years ago
Write 7.96 as a mixed number in simplest form
Vilka [71]

Answer:

199/25

Step-by-step explanation:

4 0
2 years ago
Read 2 more answers
Under his cell phone plan, Ian pays a flat cost of $59.50 per month and $5 per gigabyte. He wants to keep his bill under $80 per
inessss [21]
You would start by saying his budget is $80 so you start with 80= he pays an initial fee of $59.50 every month plus $5 per gigabyte so you would set it up like
80=59.50+5x
X being how many gigabytes he uses then you solve 80-59.50 is 20.5 divided by 5 gives you 4.1 but you round down cause you don’t want to pass the limit so therefor the most gigabytes he can use is 4
3 0
3 years ago
The perimeter of the square can be represented by the expression 36x+44 robin wants to write an equivalent expression for the pe
sukhopar [10]

Answer:

4  (9 x + 11) is an equivalent expression for the perimeter that shows the side length of the square is  (9 x + 11).

Step-by-step explanation:

Here, given The perimeter of the square  = (36 x+44)

Now,as we know :

PERIMETER OF SQUARE = 4 x ( SIDES)

Simplifying the perimeter expression.

Take 4 common out of the expression (36 x+44), we get:

(36 x+44) =  4 (9 x + 11)

⇒ Perimeter of the square  =  4 x  (9 x + 11)

⇒4 x ( SIDES) = 4 x (9 x + 11)

⇒ Each Side = (9 x + 11)

Hence, 4 x (9 x + 11) is an equivalent expression for the perimeter that shows the side length of the square is  (9 x + 11).

5 0
3 years ago
Multiply: 5x(2x4 – x3 + 3)
Leno4ka [110]

Answer:

10

x

5

A

−

5

x

4

A

+

15

x

A

Step-by-step explanation:

6 0
3 years ago
Other questions:
  • WILL GIVE BRAINLIEST<br> plz help me
    6·1 answer
  • What is the answer to this
    13·1 answer
  • (a − 6)2<br><br> Find the product. (Simplify your answer completely.)
    9·2 answers
  • True or False? The circumcenter of a triangle is the center of the only circle that can be inscribed about it.
    6·1 answer
  • A dice was rolled five times and the following were rolled: 1, 3, 3, 4, 4
    14·1 answer
  • Grace can type 140 words in 2 minutes. How many words per minute can Grace Type?
    14·2 answers
  • Simplify (8z - 10) ÷ (-2) 5(z - 1).
    11·1 answer
  • Cot^2x + 3cscx=-3 all real numbers solve for x
    10·1 answer
  • The ratio x:y is 3:1
    5·1 answer
  • Help help help help help help
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!