Itc Assignment 1
Itc Assignment 1
Assignment: 1
1. Write a function file to print the first N terms of the famous Fibonacci series of
thirteenth century.
Fibonacci series: 1, 1, 2, 3, 5, 8, 13, 21, ……………….
2. Write a function Script to calculate the sum of series say S5; x and power of x should be
given as input in the function file.
1
S5=
1
x5 +
1
x4 +
1
x3 +
1
x2 +
x1
(a) Write a function script to calculate the radial distribution of Gaussian function
defined above with A0, r0, w0 and r as input.
4. Write a function file (IFACT.mat) that compute the factorial of a given number.
x3 x5 x7 x9
Sin( x) =x − + − +
3! 5! 7! 9!
Compare the results of user defined function with the MATLAB inbuilt Sin(x) function.
n =∞
1
e=∑
n =0 n !
Fix n upto 50 and calculate the approximated value of e (IFACT.m function file for
factorial calculation). Compare the result with MATLAB inbuilt function.
8. The ratio of the output voltage V0 to the input voltage Vi in a high pass filter is given
by the equation
V0 j 2π fRC
=
Vi 1 + j 2π RC
Assume that R = 16 k Ω and C = 1 µF . Calculate and plot the amplitude and phase
response of this filter as a function of frequency.