Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

--> put this code into MATLAB Please answer all parts of question #5 (a,b, and c). Please give the answer for a, and SUBMIT THE

image text in transcribed

image text in transcribed

image text in transcribed--> put this code into MATLAB

image text in transcribed

image text in transcribed

Please answer all parts of question #5 (a,b, and c). Please give the answer for a, and SUBMIT THE PLOT for parts b and c. I have attached a screenshot of the code you will need to use -- you can copy it right into MATLAB to do everything you need. Thank you

For the following two coding problems, please submit the required results and plots. A best way is to paste them into a digit document and then print out. You do not need to submit the script files. 5. In this problem, we look at the discrete Logistic model mentioned in class: P(t +At) P(t) = rP(t) (1-P). (1) At which models how the bank 'penalize the interest rate for a large amount of deposit with respect to a . A bank sets K =1 (in millions) and gives REALLY high interest rate for saving account. In addition, the bank calculates all monetary figures in cents (=10-million), which leads to a 9 decimal places rounding The couple in HW1, Q3 saw this and decided to put their educational seed fund $20,000 into a saving account of this bank. Also, they did the calculation themselves at home using a calculator always rounding up to 10 decimal places. The attached script file 'Chaotic Balance.m' is based on Eq. (1) and does the calculations. Read its header for how to use (should be straightforward). Chaotic_Balance. m x + * This program compute the balance of bank account according to the capped % growth model. Rd is the number of demial places used in the calculation. % P_0 is the initial deposit, Year is the number of years, Rt is the annual % rate. % P_t is the vector which stores the balances of each year. P_t(1) = P_0 is % the initial deposit. P_t(N+1) is the balance of the N-th year. % To execute, for instance for P_0=1000 (units), Rd=9, Year = 20, Rt = % 0.15, % run in the command window 'deposit = Chaotic_Balance (1000, 9, 20, 0.15)'. function P_t = Chaotic_Balance(P_, Rd, Year, Rt) format long P_t = zeros (Year+1,1); % initial balance P_t(1)=P_0; for i=1: Year P_t(i+1) = round (P_t(i) + Rt * P_t(i) * (1-P_t(i)), Rd); end end (a) Given the rate r = 100%, after 18 years (no withdraw was made), how much balance do they have in their balance, calculated by the bank and by the couple, respectively? Do they have enough money to put their daughter through college? (b) Now, if the bank gives a rate of 200%, do (a) again and report the differences you observe. To make it more intuitive, write a script to plot the balances calculated by the bank and by the couple (in a single figure). Submit the plot. You should get something like this: (c) Finally, if the bank gives a rate of 300%, do (a) again for 100 years. What's going on? Report your observations. Additionally, plot the graph (as in (b)) for 100 years. Submit the plot. This is (probably the first plot of chaos you made. For the following two coding problems, please submit the required results and plots. A best way is to paste them into a digit document and then print out. You do not need to submit the script files. 5. In this problem, we look at the discrete Logistic model mentioned in class: P(t +At) P(t) = rP(t) (1-P). (1) At which models how the bank 'penalize the interest rate for a large amount of deposit with respect to a . A bank sets K =1 (in millions) and gives REALLY high interest rate for saving account. In addition, the bank calculates all monetary figures in cents (=10-million), which leads to a 9 decimal places rounding The couple in HW1, Q3 saw this and decided to put their educational seed fund $20,000 into a saving account of this bank. Also, they did the calculation themselves at home using a calculator always rounding up to 10 decimal places. The attached script file 'Chaotic Balance.m' is based on Eq. (1) and does the calculations. Read its header for how to use (should be straightforward). Chaotic_Balance. m x + * This program compute the balance of bank account according to the capped % growth model. Rd is the number of demial places used in the calculation. % P_0 is the initial deposit, Year is the number of years, Rt is the annual % rate. % P_t is the vector which stores the balances of each year. P_t(1) = P_0 is % the initial deposit. P_t(N+1) is the balance of the N-th year. % To execute, for instance for P_0=1000 (units), Rd=9, Year = 20, Rt = % 0.15, % run in the command window 'deposit = Chaotic_Balance (1000, 9, 20, 0.15)'. function P_t = Chaotic_Balance(P_, Rd, Year, Rt) format long P_t = zeros (Year+1,1); % initial balance P_t(1)=P_0; for i=1: Year P_t(i+1) = round (P_t(i) + Rt * P_t(i) * (1-P_t(i)), Rd); end end (a) Given the rate r = 100%, after 18 years (no withdraw was made), how much balance do they have in their balance, calculated by the bank and by the couple, respectively? Do they have enough money to put their daughter through college? (b) Now, if the bank gives a rate of 200%, do (a) again and report the differences you observe. To make it more intuitive, write a script to plot the balances calculated by the bank and by the couple (in a single figure). Submit the plot. You should get something like this: (c) Finally, if the bank gives a rate of 300%, do (a) again for 100 years. What's going on? Report your observations. Additionally, plot the graph (as in (b)) for 100 years. Submit the plot. This is (probably the first plot of chaos you made

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions