Answer to Question #210743 in MatLAB for Rama

Question #210743

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

2) Suppose that the number of bacteria in a colony doubles every hour. If a colony begins with five bacteria, how many will be present in n hours?


1
Expert's answer
2021-06-27T14:12:27-0400
close all,
clear all,
clc,


a=5; % Initial Bacteria Value
syms n z
f = a*2^(n-1);
disp(['Z-Transform: f = ',32,num2str(a),'*2^(n-1):']);
fZT = ztrans(f)
disp(['No. of bacteria at the end of n hours = ']);
IZT = iztrans(fZT)

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
APPROVED BY CLIENTS