Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how would i use mean() in this program DULUMIWILAD Wol Nam assign03a.m* x + % ***** CONSTANTS ****** % get principle principle = 4000; %

how would i use mean() in this program
image text in transcribed
image text in transcribed
DULUMIWILAD Wol Nam assign03a.m* x + % ***** CONSTANTS ****** % get principle principle = 4000; % **** INPUT *** % get interest rate per period range and time from the user time = input('enter time period'); $time lower = input('interest lower limit'); $interest rate range upper = input('interest upper limit'); interest rate range numberOfRate = input('size of range'); number of rate % create rate vector rate = linspace(lower, upper, numberOfRate); rate vector simpleInterest - zeros(1, numberOfRate); $simple interest vector % ***** COMPUTE ***** % compute simple interest($) for i = 1:numberOfRate simple Interest (1) = ((principle * rate(1) * time) / 100); 4$ end % create a table with rate and simple interest result = table(rate, simpleInterest); % get the average rate and interest avgRate = sum(rate)umberOfRate; 40 - avgInterest - sum(SimpleInterest)umber ofRate; Command Window fx >> V x assign03a.m* x + UNIVIRUCTpuc ICC UT Turgy Urrumurro % create rate vector rate = linspace ( Lower, upper, numberOfRate); %rate vector simpleInterest = zeros (1, numberOfRate); %simple interest vector % ***** COMPUTE ***** % compute simple interest($) for i = 1: numberOfRate simpleInterest(i) = ((principle * rate(1) * time) / 100);%$ end % create a table with rate and simple interest result = table(rate, simpleInterest); % get the average rate and interest avgRate = sum(rate)umberOfRate; avgInterest = sum(SimpleInterest)umberofRate; % ***** OUTPUT ***** %display simple interest with label disp('simple interest'); disp(result); %display average rate and interest with label disp('average rate'); disp(avgRate); disp('average simple interest'); disp(avgInterest); Command Window

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 Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions