Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MATLAB HELP PLS THE LAST SECTION WAS ANSWERED I JUST NEED THE REST ANSWERED PLS Assignment 1: Investment Fund (5 marks) Background. At the beginning
MATLAB HELP PLS THE LAST SECTION WAS ANSWERED I JUST NEED THE REST ANSWERED PLS
Assignment 1: Investment Fund (5 marks) Background. At the beginning of every year a bank customer deposits v dollars in an investment fund and withdraws, at the end of the n-th year, a capital of M dollars. We want to compute the average yearly rate of interest r of this investment. M is related to r by the relation: 1+1 * = v=--((1+r)" - 1] (1) Assignment: Numerically estimate the average annual interest rate assuming that v is equal to $1000 and that after 5 years M is equal to $6000. Convert eg. 1 into a root problem and plot the equation for a relevant range. Compute the root via the bisection method Compare the bracket methods, bisectional and false position (you'll have to create an m-file for the false position method), for the efficiency to determine the root (number of required iterations to reach desired relative error Run Section Go To Comme New Open Save L. Compare Breakpoints Run Run and , Advance Run and Print Find - Indent 1 5 - Advance Time FILE NAVIGATE EDIT BREAKPOINTS RUN - ba Users evamo OneDrive Documents MATLAB Cu... Editor - C:\Users\evamo OneDrive\Documents\MATLAB goldmin.m Section 20s. m x quiz2from 2019.m x falseposition.m x bisect.m x mpower.m x goldmin. m x + | function [x, fx, ea, iter] =goldmin(f, xlo, xu, es, maxit, varargin) x Q % goldmin: minimization golden section search f (xopt, fopt, ea, iter]=goldmin (f,xl, xu, es,maxit,pl,p2, ...): % uses golden section search to find the minimum of f $ input: $ f = name of function $ xlo, xu = lower and upper guesses % es = desired relative error (default = 0.0001%) $ maxit = maximum allowable iterations (default - 50) $ pl,p2,... = additional parameters used by f $output: x = location of minimum % fx = minimum function valuex0=[0.5, 0.5]; D... A W... ea = approximate relative error (%) iter = number of iterations Name III if nargin Command Window Ready goldmin .. 1 O Type here to search In 3 Col 47 rue 1:05 PM - ENG 2020-02-11 SAA 1) O O - O X Sign In do E 5 Search Documentation MATLAB R2019b-academic use HOME PLOTS APPS EDITOR PUBLISH VIEW + G E L Find Files - Insert & fx Run Section New Open Save 3 Compare - Go To Comment % % Breakpoints Run Run and , Advance Run and Print Find - Indent 1 5 - Advance Time FILE NAVIGATE EDIT BREAKPOINTS RUN - ba Users evamo OneDrive Documents MATLAB Cu... Editor - C:\Users\evamo OneDrive\Documents\MATLAB goldmin.m Section20s. m x quiz2from 2019.m x falseposition. m x bisect.m x mpower.m x goldmin. m x + x phi=(1+sqrt (5))/2; iter=0; while (1) d=(phi-1) * (xu-xlo); xl = xlo +d; x2 = xu -d; III III III II if f(xl, varargin{:})
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started