Answer to Question #210742 in MatLAB for Rama

Question #210742

Write a MATLAB code to solve the following difference equations by z-transform and display the solutions by stem plots:

1) An amount of USD 10,000 $ is deposited in a bank account with an annual interest

rate of 4%. Determine the balance of the account after 15 years.


1
Expert's answer
2021-06-27T14:09:19-0400
close all,
clear all,
clc,
% An amount of USD 10,000 $ is deposited in a bank account with an annual interest
% rate of 4%. Determine the balance of the account after 15 years
syms n
P = 10000;
R = 4;
T = 15;
f = P*(1+(R*n)/100);
Z_Transform = ztrans(f)


f(15) = iztrans(Z_Transform);
A=[];
for n=1:T
    A(n) = P*(1+(R*n)/100);
end
scrsz = get(0,'ScreenSize');
Dim=0;
figure('Position',[scrsz(1)+Dim, scrsz(2)+Dim,scrsz(3)-20,scrsz(4)-100]);
stem(A);
xlabel('--- Years (n) --->');
ylabel('--- Amount --->');
title('Stem Plot of Growth','FontSize',20);
grid on
disp(['Amount after ',32,num2str(T),32,'years = ',32,num2str(A(T))]);

"Z-Transform = 10000*\\frac{z}{z-1} + 400*\\frac{z}{(z-1)^2}"




Final Output:

Amount after 15 years = 16000


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS