Question

The amount of construction loans of peer banks as a percentage of its capital from the beginning of 2015 (t = 0) through to t
0 0
Add a comment Improve this question Transcribed image text
Answer #1


Matlab code for plotting clear all close all syms t tfunction ro peecage ap t.2+30.08.*tt51.9; - 16.78 g(t)-0.656.*t.^4+5.693 end end root-xx; fprintf\n\tUs ing Newton method maxima will occured at t f\n,root) Splotting all functions tt1nspace ( 0,5Bank percentage of capitals 120 100 80 60 40 20 F -20 40 4.5 3 3.5 25 15 05 1 t Published with MATLAB R2018a 6 pue a)

%%Matlab code for plotting
clear all
close all

syms t
%function for percentage of capital
g(t)=-0.656.*t.^4+5.693.*t.^3-16.789.*t.^2+30.08.*t+51.9;

%finding the percentage first crossing 100
gg(t)=-0.656.*t.^4+5.693.*t.^3-16.789.*t.^2+30.08.*t+51.9-100;

%Here we willbe using Newton method for finding percentage


g1(t) =diff(gg,t);   %1st Derivative of this function
xx=1;                %initial guess]
%Loop for all intial guesses
    n=eps; %error limit for close itteration
    for i=1:1000
        x2=double(xx-(gg(xx)./g1(xx))); %Newton Raphson Formula
        cc=abs(gg(x2));                 %Error
        err(i)=cc;
        xx=x2;
        if cc<=n
            break
        end
      
    end
    root=xx;
  
fprintf('\n\tUsing Newton method it will reach 100 percentage at t=%f\n',root)

%finding root for 1st derivative zero
g_1(t)=diff(g,t);
fprintf('\n\tFor finding maxima 1st derivative should be zero\n')
fprintf('\n\t1st derivative of the function f(t)=')
disp(vpa(g_1,6))

g_2(t) =diff(g_1,t);   %1st Derivative of this function g
xx=1;                 %initial guess]
%Loop for all intial guesses
    n=10^-6; %error limit for close itteration
    for i=1:1000
        x2=double(xx-(g_1(xx)./g_2(xx))); %Newton Raphson Formula
        cc=double(abs(g_1(x2)));                 %Error
        err(i)=cc;
        xx=x2;
        if cc<=n
            break
        end
      
    end
    root=xx;
  
fprintf('\n\tUsing Newton method maxima will occured at t=%f\n',root)

%plotting all functions
tt=linspace(0,5,1000);
g1=g(tt);
f1=g_1(tt);
y=100*ones(size(tt));

hold on
plot(tt,g1,'r','linewidth',2)
plot(tt,f1,'b','linewidth',2)
plot(tt,y,'k','linewidth',2)

legend('g(t)','f(t)','y')
title('Bank percentage of capitals')
xlabel('t')
ylabel('f(t) and g(t)')

box on


%%%%%%%%%%%%%%%%%%%%% End of Code %%%%%%%%%%%%%%%%%
   

Add a comment
Know the answer?
Add Answer to:
The amount of construction loans of peer banks as a percentage of its capital from the beginning of 2015 (t = 0) th...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1) You wish to borrow $150,000 from a lending institution for the purchase of a house....

    1) You wish to borrow $150,000 from a lending institution for the purchase of a house. The bank will lend this amount at an Annual Percentage Rate of 4.5% to be paid-off with equal monthly mortgage payments over a 30-year period. This is a 4.5% APR, 30-year fixed-rate mortgage loan. You wish to know how this loan will affect your federal income tax burden, as only the interest paid on a home mortgage, not the principal, is tax deductible. Construct...

  • LO 2 8-47 Target costing Mercedes-Benz All Activity Vehicle (AAV)'3 Introduction During the recession beginning in...

    LO 2 8-47 Target costing Mercedes-Benz All Activity Vehicle (AAV)'3 Introduction During the recession beginning in the early 1990s, Mercedes-Benz (MB) struggled with product development, cost efficiency, material purchasing, and problems in adapting to changing mar- kets. In 1993, these problems caused the worst sales slump in decades, and the luxury car maker lost money for the first time in its history. Since then, MB has streamlined the core business, re- duced parts and system complexity, and established simultaneous engineering...

  • MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 1)...

    MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 1) The LM curve represents A) the single level of output where the goods market is in equilibrium. B) the combinations of output and the interest rate where the goods market is in equilibrium. C) the single level of output where financial markets are in equilibrium. D) the combinations of output and the interest rate where the money market is in equilibrium. E) none of...

  • MULTIPLE CHOICE.  Choose the one alternative that best completes the statement or answers the question. 1) The...

    MULTIPLE CHOICE.  Choose the one alternative that best completes the statement or answers the question. 1) The LM curve represents A) the single level of output where the goods market is in equilibrium. B) the combinations of output and the interest rate where the goods market is in equilibrium. C) the single level of output where financial markets are in equilibrium. D) the combinations of output and the interest rate where the money market is in equilibrium. E) none of the...

  • CASE 1-5 Financial Statement Ratio Computation Refer to Campbell Soup Company's financial Campbell Soup statements in...

    CASE 1-5 Financial Statement Ratio Computation Refer to Campbell Soup Company's financial Campbell Soup statements in Appendix A. Required: Compute the following ratios for Year 11. Liquidity ratios: Asset utilization ratios:* a. Current ratio n. Cash turnover b. Acid-test ratio 0. Accounts receivable turnover c. Days to sell inventory p. Inventory turnover d. Collection period 4. Working capital turnover Capital structure and solvency ratios: 1. Fixed assets turnover e. Total debt to total equity s. Total assets turnover f. Long-term...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT