Professional Documents
Culture Documents
E, TIRUPATI
PROGRAM 1:
A digital Filter has the depicted (in figure below) unit-sample response has
h[n]=[n]+2[n-1]+[n-2]
1.8
1.6
1.4
1.2
0.8
0.6
0.4
0.2
0
1 1.5 2 2.5 3 3.5 4 4.5 5
a) What is the difference equation that defines this filter input-output relationship?
b) What is filters transfer function?
c) What is filters output when input is sin (n/4)?
THEORY:
Y(Z) Is filter output response, X(Z) is filter input and H(Z) is filter transfer function.
MATLAB COMMANDS:
y=conv(x,h);
x=input sequence
h=impulse response
y=output sequence
MATLAB CODE:
n=-2:1:2;
h=input('enter the impluse squence');% taking impulse sequence from user(in this case [1 2 1])
subplot(3,3,1);
stem(x);
title('input squence');
xlabel('n...>');
ylabel('x[n]...>');
subplot(3,3,2);
stem(h);
title('impulse squence');
xlabel('n...>');
ylabel('h[n]...>');
%part(a)
subplot(3,3,3);
stem(y);
title('input-output relation');
xlabel('n...>');
ylabel('y[n]...>');
%part(b)
subplot(3,3,4);
stem(H);
disp(H)
title('filter TF');
xlabel('n...>');
ylabel('H(K)...>');
%part(c)
y1=conv(z,h);
subplot(3,3,5);
stem(z);
title('input to system');
xlabel('n...>');
ylabel('z[n]...>');
subplot(3,3,6);
stem(y1);
title('output of system');
xlabel('n...>');
ylabel('y1[n]...>');
PLOT:
RESULT:
The filters transfer function and its output for sinusoidal input, input-output relation is plotted
using MATLAB
PROGRAM 2:
Y(n)=1/3x(n+2)+2/3x(n+1)+x(n)+2/3x(n-1)+1/3x(n-2)
THEORY:
Based on zero locations of pole-zero plot FIR filters are classified into four types as follows.,
(a) Type 1 FIR FILTER: Either an even number or no zeros at z=1 and z=-1. (b) Type 2 FIR
FILTER: Either an even number or no zeros at z=1 and an odd number of zeros at z=-1. (c)
Type 3 FIR FILTER: An odd number of zeros at z=1 and z=-1. (d) Type 4 FIR FILTER: An
odd number of zeros at z=1 and either an even number or no zeros at z=-1.
MATLAB COMMANDS:
Description:
[h,t] = impz(b,a) computes the impulse response of the filter with numerator coefficients b
and denominator coefficients a. impz chooses the number of samples and returns the
response in the column vector h and sample times in the column vector t (where t = [0:n-1]',
and n = length(t) is computed automatically).
Syntax: zplane(b,a)
Description: This function displays the poles and zeros of discrete-time systems.
Zplane (b,a) where b and a are row vectors, first uses roots to find the zeros and poles of the
transfer function represented by numerator coefficients b and denominator coefficients a. The
transfer function is defined in terms of z-1.
MATLAB CODE:
H=ifft(h);% TF of filter
subplot(1,3,1);
stem(h);
disp(h)
title('filter impule reponse');
xlabel('n...>');
ylabel('h(n)...>');
%part(b)
subplot(1,3,2);
stem(H);
disp(H)
title('filter TF');
xlabel('k...>');
ylabel('H(K)...>');
subplot(1,3,3);
z=zplane(h);
h[n]=
0.3333
0.6667
1.0000
0.6667
0.3333
H(k)=
0.6000 + 0.0000i
-0.1412 + 0.1026i
0.0079 - 0.0242i
0.0079 + 0.0242i
-0.1412 - 0.1026i
PLOT:
RESULT:
The filter unit sample response and its transfer function is plotted using MATLAB and its
observed that filter category is TYPE-4
PROGRAM 3:
y(n)=1/4x(n)+1/2x(n-1)+1/4x(n-2)
0.8
0.6
0.4
0.2
-0.2
-0.4
-0.6
-0.8
-1
0 2 4 6 8 10 12 14 16 18
MATLAB CODE:
clc;close all;clear all;
num=input('enter the numerator squence');% in this case [1/4 2/4 1/4]
den=input('enter the denominator squence');%[1]
%part(a)
h=impz(num,den);% impz function will give impulse response of filter
subplot(3,3,1);
stem(h);
disp(h)
title('impulse response of filter');
xlabel('n...>');
ylabel('h(n)...>');
H=fft(h);% TF of filter
subplot(3,3,2);
stem(H);
disp(H)
title('filter TF');
xlabel('k...>');
ylabel('H(k)...>');
subplot(3,3,3);
zplane(h);
%part(b)
n=-2:0.5:2;
z1=cos((pi*n)/2);% i/p to the system
y1=conv(z1,h); % o/p of system
subplot(3,3,4);
stem(z1);
title('input to system');
xlabel('n...>');
ylabel('z1[n]...>');
subplot(3,3,5);
stem(y1);
title('output of system');
xlabel('n...>');
ylabel('y1[n]...>');
%part(c)
z2=square(n,50); % i/p to the system
y2=conv(z2,h);% o/p of system
subplot(3,3,6);
stem(z2);
title('input to system');
xlabel('n...>');
ylabel('z2[n]...>');
subplot(3,3,7);
stem(y2);
title('output of system');
xlabel('n...>');
ylabel('y2[n]...>');
INPUT&OUTPUT:
enter the numerator squence[1/4 2/4 1/4]
enter the denominator squence[1]
h(n)=
0.2500
0.5000
0.2500
H(k)=
1.0000 + 0.0000i
-0.1250 - 0.2165i
-0.1250 + 0.2165i
PLOT:
RESULT:
The filters transfer function and its output for sinusoidal input, discrete time square wave is
plotted using MATLAB and its observed that filter category is TYPE-1.
PROGRAM 4:
Using MATLAB compute and plot the magnitude response and phase response of a second order
band pass and band stop IIR digital filters for values of say 0.2 ,0.5 ,0.8 with = 0.34 is said
to be constant. Repeat the same by interchanging the values of and
THEORY:
MATLAB CODE:
enter the beta value0.34 enter the beta value0.34 enter the beta value0.34
enter the alpha value0.2 enter the alpha value0.5 enter the alpha value0.8
enter the beta value0.2 enter the beta value0.5 enter the beta value0.8
enter the alpha value0.34 enter the alpha value0.34 enter the alpha value0.34
PLOTS:
RESULT:
The magnitude and phase response of a second order band pass and band stop filters are
computed and plotted using MATLAB
PROGRAM 5:
a) Using MATLAB compute and plot the magnitude response of a comb filter obtained from a
prototype FIR high pass filter of Hhp(Z)= (1) with M=2 and for different values
of L. Determine the location of the notches and peaks of the magnitude response of this type of
comb filter. Assume L=3, L=4.
b) Using MATLAB compute and plot the magnitude response of a comb filter obtained from a
prototype FIR LPF Hlp(Z)= (1 + ) for diff. values of L Show that the new filter has multiple
notches at w= wk= (2k+1). And has L peaks in its magnitude responses w= wk =
,k=0,1,....,L-1
THEORY:
H hp (Z)= (1)
( )
The filter has L notches located at and has L peaks located at 0kL-1
( )
The filter has L peaks located at and has L peaks located at 0kL-1
MATLAB CODE:
ylabel('magnitude...>');
p=((2*(k+1)*pi))/L;
n=(2*k*pi)/L;
peaksHPF=(p/pi)
notchesHPF=(n/pi)
%part(b)
k=0:1:L-1;
w=0:0.1:2*pi;
wn=w/pi;
z=exp((1j*w));
HcombLPF=0.5*(1+z.^((-1)*L));
subplot(2,1,2);
plot(wn,abs(HcombLPF));
title('Comb filter of LP prototype');
xlabel('w/pi...>');
ylabel('magnitude...>');
p=(2*k*pi)/L;
n=((2*(k+1)*pi))/L;
peaksLPF=(p/pi)
notchesLPF=(n/pi)
INPUT &OUTPUT:
enter the L +ve integer value3 enter the L +ve integer value4
PLOT:
M=2, L=3
M=2, L=4
RESULT:
The magnitude and phase response of a comb filter was computed and plotted and the notches
and the peaks of the magnitude response of the comb filter was determined using MATLAB.
PROGRAM 6:
1
( )=
1
a) Sketch the magnitude response and pole zero diagram of this filter for |a|<1 and D=3
take |a| =0.2, |a| =0.5, |a| =0.7.
b) Comment on the following conditions for this filter: All pass, minimum phase and linear
phase which hold and dont hold why?
MATLAB CODE:
clc
clear all
d=3;
a=0.2;
w=0:pi/128:2*pi;
z=exp(j*w);
nr=(1-a*(power(z,-d)));
dr=(1-(power(a,4)*(power(z,-4*d))));
for i=1:257
h(i)=nr(i)/dr(i);
end
subplot(3,2,1);
plot(w/pi,abs(h));
subplot(3,2,2);
zplane(h);
a=0.5;
w=0:pi/128:2*pi;
z=exp(j*w);
nr=(1-a*(power(z,-d)));
dr=(1-(power(a,4)*(power(z,-4*d))));
for i=1:257
h(i)=nr(i)/dr(i);
end
subplot(3,2,3)
plot(w/pi,abs(h));
subplot(3,2,4);
zplane(h);
a=0.7;
w=0:pi/128:2*pi;
z=exp(j*w);
nr=(1-a*(power(z,-d)));
dr=(1-(power(a,4)*(power(z,-4*d))));
for i=1:257
h(i)=nr(i)/dr(i);
end
subplot(3,2,5);
plot(w/pi,abs(h))
subplot(3,2,6)
zplane(h)
PLOT:
1.5
Imaginary Part
1
256
1 0
0.5 -1
0 0.5 1 1.5 2 -2 -1 0 1 2
Real Part
2
Imaginary Part
1
256
1 0
0 -1
0 0.5 1 1.5 2 -2 -1 0 1 2
Real Part
4
Imaginary Part
256
2 0
0 -1
0 0.5 1 1.5 2 -2 -1 0 1 2
Real Part
RESULT:
The magnitude and pole zero diagram of a given comb filter was computed and
plotted using MATLAB.
PROGRAM 7:
1
( )=
1
a) Sketch the magnitude response and pole zero diagram of this filter for |a|<1 and D=4
take |a| =0.2, |a| =0.5, |a| =0.7.
b) Comment on the following conditions for this filter: All pass, minimum phase and linear
phase which hold and dont hold why?
MATLAB CODE:
clc
clear all
d=4;
a=0.2;
w=0:pi/128:2*pi;
z=exp(j*w);
nr=(1-(power(a,3))*(power(z,-3*d)));
dr=(1-a*(power(z,-d)));
for i=1:257
h(i)=nr(i)/dr(i);
end
subplot(3,2,1);
plot(w/pi,abs(h));
subplot(3,2,2);
zplane(h);
a=0.5;
w=0:pi/128:2*pi;
z=exp(j*w);
nr=(1-(power(a,3))*(power(z,-3*d)));
dr=(1-a*(power(z,-d)));
for i=1:257
h(i)=nr(i)/dr(i);
end
subplot(3,2,3)
plot(w/pi,abs(h));
subplot(3,2,4);
zplane(h);
a=0.7;
w=0:pi/128:2*pi;
z=exp(j*w);
nr=(1-(power(a,3))*(power(z,-3*d)));
dr=(1-a*(power(z,-d)));
for i=1:257
h(i)=nr(i)/dr(i);
end
subplot(3,2,5);
plot(w/pi,abs(h))
subplot(3,2,6)
zplane(h)
PLOTS:
RESULT:
The magnitude and pole zero diagram of a given comb filter was computed and plotted using
MATLAB.
PROGRAM 8:
THEORY:
All pass complementary: A set of M transfer functions {Hi (Z)}, 0iM-1, is defined to be
All pass complementary of each other if the sum of their transfer functions is equal to an All
pass function A(Z).
Power complementary: A set of M stable digital transfer functions {Hi (Z)}, 0iM-1, is
defined to be Power complementary of each other if the sum of the squares of their
magnitude responses is equal to a constant K.
Doubly complementary: A set of M stable digital transfer functions satisfying both the All
pass complementary property and the Power complementary property is known as Doubly
complementary.
Power symmetry: A real coefficient causal digital filter with a transfer function H(Z) is said
to be a power symmetry filter if it satisfies the condition H(Z)H(Z-1)+H(-Z)H(-Z-1)=K,
where K>0 is a constant.
MATLAB CODE:
clc;
clear all;
num=[2 2];
den=[3 1];
h=num./den;
a=impz(num,den);
num1=[1 -1];
den1=[3 1];
g=num1./den1;
b=impz(num1,den1);
OUTPUT:
c =2.3331
n =1.0000
RESULT:
Doubly Complementary, Delay complementary and Power complementary functions for a given
transfer functions are verified using MATLAB.
PROGRAM 9:
Using MATLAB determine if or not all the roots of following polynomial are inside the unit
circle if
)
D (Z) =1 + 2.5 + 2.5 + 1.25 + 0.3125 + 0.03125
Test the stability of the all-pass filter A(Z) based on the stability test parameters also
THEORY:
Stability Test: The BIBO stability of a causal rational transfer function requires that all its poles
be inside the unit circle. For very high order transfer functions, it is difficult to determine the
pole locations analytically, and the use of some type of roots finding computer program is
necessary. We outline here a simple algebraic stability test procedure that does not require the
determination of the pole locations. The algorithm is based on the realization of an all pass
transfer function with a denominator that is the same as that of the transfer function of interest.
MATLAB CODE:
clc;
clear all;
dr=[1 2.5 2.5 1.25 0.3125 0.03125];
k=poly2rc(dr);%finding stability test parameters
knew=fliplr(k');%to display parameters in correct order
disp('stability parameters are:');
disp(knew);
stable=all(abs(k)<1)
if(stable==1)
disp('filter is stable');
else disp('filter unstable');
end
OUTPUT:
stable =1
filter is stable
RESULT:
The stability of the all-pass filter based on stability test parameters is predicted successfully
using MATLAB
PROGRAM 10:
State Space Representation: The system transfer function for a discrete time digital system is
given by
Develop a state space representation for the system using the form Q[n]=AQ[n-1]+B x[n] and
y[n]= CQ[n-1]+D x[n]. Clearly identify the A,B,C,D matrices for your implementation.
MATLAB CODE:
A=
B=
1
0
0
0
C = 0.0922 -0.2872 0.3205 -0.2273
D = 0.9842
RESULT:
State Space Representation of the system transfer function for a discrete time digital system
using MATLAB
PROGRAM 11:
MATLAB CODE:
%Cascade Realization
clc;
clear all;
n=input('enter nr');
d=input('enter dr');
[b,a]=eqtflength(n,d); %make lengths equal
[z,p,k]=tf2zp(b,a); %transfer filter parameters to zero-pole gain form
sos=zp2sos(z,p,k) %zero-pole gain filter parameters to second order sections
INPUT
enter nr[2 10 23 34 31 16 4]
enter dr[1]
OUTPUT
sos =
INPUT
enter nr[3 8 12 7 2 -2]
enter dr[16 24 24 14 5 5]
OUTPUT
sos =
RESULT:
By using MATLAB,cascade realization of both IIR and FIR transfer functions are obtained
PROGRAM 12:
MATLAB CODE:
%parallel Realization
clc;
clear all;
nr=input('enter nr');
dr=input('enter dr');
[r,p,k]=residuez(nr,dr)
disp('parallel form 1');
[r1,p1,k1]=residuez(nr,dr)
Disp(parallel form 2);
[r2,p2,k2]=residue(nr,dr)
INPUT
enter nr[2 10 23 34 31 16 4]
enter dr[36 78 87 59 26 7 1]
OUTPUT
parallel form 1
r=
-0.5556 - 2.2785i
-0.5556 + 2.2785i
-0.5952 - 0.7561i
-0.5952 + 0.7561i
-0.8214 + 4.3920i
-0.8214 - 4.3920i
p=
-0.3333 + 0.4714i
-0.3333 - 0.4714i
-0.5000 + 0.2887i
-0.5000 - 0.2887i
-0.2500 + 0.4330i
-0.2500 - 0.4330i
k =4
parallel form 2
r1 =
1.2593 + 0.4976i
1.2593 - 0.4976i
0.5159 + 0.2062i
0.5159 - 0.2062i
-1.6964 - 1.4537i
-1.6964 + 1.4537i
p1 =
-0.3333 + 0.4714i
-0.3333 - 0.4714i
-0.5000 + 0.2887i
-0.5000 - 0.2887i
-0.2500 + 0.4330i
-0.2500 - 0.4330i
k1 =
0.0556
RESULT:
The parallel form realizations (I & II) for a given transfer function is realized using MATLAB
PROGRAM 13:
MATLAB CODE:
clc;
clear all;
n=input('enter nr');
d=input('enter dr');
n=n/d(1);
d=d/d(1);
[k,alpha]=tf2latc(n,d)
disp('check of lattice/ladder inversion');
[n,d]=latc2tf(k,alpha)
INPUT
enter nr[.22 1.1 2.2 2.2 1.1 .22]
enter dr[1 -.9853 .9738 -.3864 .1112 -.1113]
OUTPUT
k = -0.4545
0.7219
-0.2800
0.0016
-0.1113
alpha =-1.1515
1.7038
4.2767
3.2829
1.3168
0.2200
RESULT:
Gray markel realization for given causual IIR TF is realized
PROGRAM 14:
Realizing All-pass transfer function in its cascade lattice structure using poly2rc
MATLAB CODE:
INPUT
OUTPUT
RESULT: Given All-pass transfer function in its cascade lattice structure using poly2rc is
realized by MATLAB
PROGRAM 15:
(a) Realize the following IIR transfer function G(z) in the form of parallel allpass atructure
G(Z)= 0.1327(1-Z-2)2 / (1+0.2377 Z-1+0.8152 Z-2+0.1294Z-3+0.3618 Z-4)
(b) From the allpass decomposition ,determine its power-complimentary transfer function
H(Z)
(c) Plot the square of the magnitude response of the original transfer function G(Z) and its
power-complimentary transfer function H(Z) derived in part(b) ,and verify that thir sum
is equal to one at all frequencies
MATLAB CODE:
clc;
clear all;
n1=input('enter numerator coefficients');
d1=input('enter denominator coefficients');
[h,w]=freqz(n1,d1);
[n2,d2]=iirpowcomp(n1,d1);% power complimentary transfer function of G(Z)
[g,w]=freqz(n2,d2);
hold all;
plot(w/pi,abs(h.^2),'r');
plot(w/pi,abs(g.^2),'g');
plot(w/pi,(abs(h.^2)+abs(g.^2)),'y');
INPUT
enter numerator coefficients [.1327 0 -.2654 0 0.1327]
enter denominator coefficients[1 0.2377 0.8152 0.1294 0.3618]
PLOT:
1.4
1.2
0.8
magnitude
0.6
0.4
0.2
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
w/pi
RESULT:
The power complimentary TF for given IIR band pass filter is obtained and square of the
magnitude response of the original transfer function G(Z) and its power-complimentary transfer
function H(Z) is plotted ,and verify that their sum is equal to one at all frequencies.
PROGRAM 16:
Then choosing and properly with =0.9 and plot for first 50 samples of its two output
sequences.Scale the output so that both have maximum amplitude of 1. What is effect of initial
conditions of variables Si[n]?
MATLAB CODE:
PLOT
0.8
0.6
0.4
0.2
amplitude
-0.2
-0.4
-0.6
-0.8
-1
0 5 10 15 20 25 30 35 40 45 50
n
RESULT:
The sine cosine generator is simulated with one multiliper structure for given specifications of
maximum amplitude 1 , and =0.9 using MATLAB
It is observed that output is zero for zero initial conditions ,non zero initial conditions of equal
values appear to have no effects on the output,however unequal initial conditions have effects on
the amplitudes and phase of two output sequences
PROGRAM 17:
MATLAB CODE:
%FFT or IFFT
x=input('enter the sequence');
swtch=input('enter 0 for fft or 1 for ifft:');
X=edufft(x,swtch);%calling edufft function
disp(X);
% defining functions
function X=ctrecur(x,W);
N=length(x);
Q=N;
for i=2:floor(sqrt(N))
if(rem(N,i)==0)
Q=i;
break
end
end
if(Q==N)
X=primedft(x,W);%calling primedft function
else
P=N/Q
tmp=reshape(x,P,Q);
for p=0:P-1
tmp(p+1,:)=primedft(tmp(p+1,:),W(1:P:N));
if(p>0)
tmp(p+1,2:Q)=tmp(p+1,2:Q).*W(rem(p*(1:Q-1),N)+1)
end
end
for q=1:Q
tmp(:,q)=(ctrecur(tmp(:,q).',W(1:Q:N))).';
end
X=reshape(tmp.',1,N);
end
function X=edufft(x,swtch)
N=length(x);
x=reshape(x,1,N);
if(swtch)
W=exp((j*2*pi/N)*(0:N-1));
else
W=exp((-j*2*pi/N)*(0:N-1));
end
X=ctrecur(x,W);%calling ctrecur function
if(swtch)
X=(1/N)*X;
end
function y=primedft(x,W)
disp(x);
N=length(x);
n=1:N-1;
y=zeros(1,N);
y(1)=sum(x);
for k=1:N-1
y(k+1)=x(1)+sum(x(2:N).*W(rem(k*n,N)+1));
end
INPUT
OUTPUT
INPUT
OUTPUT
6.0000 -0.4137 - 0.1644i -1.2849 - 0.9143i -0.8014 + 0.6221i -0.8014 - 0.6221i -1.2849
+ 0.9143i -0.4137 + 0.1644i
RESULT:
The prime DFT,cooley-tukey frequency domain FFT are computed using MATLAB
PROGRAM 18:
MATLAB CODE:
%Sliding DFT
clc;
x=[1,1,1,1,1,1,1,1];
N=length(x);X=fft(x,N);
m=2;n=[0:N-1];n=mod(n-m,N);
y=x(n+1)
Y=fft(y)
k=[0:N-1];
X.*exp(-j*2*pi*m*k/N);
z=[2,3,4,5,6];
Z=fft(z);
k=[0:N-1];(X(k+1)-x(1)+z(end)).*exp(j*2*pi*k/N)
k=4;(X(k+1)-x(1)+z(end)).*exp(j*2*pi*k/N);
OUTPUT
y=1 1 1 1 1 1 1 1
Y =8 0 0 0 0 0 0 0
ans =
Columns 1 through 7
13.0000 3.5355 + 3.5355i 0.0000 + 5.0000i -3.5355 + 3.5355i -5.0000 + 0.0000i -3.5355 -
3.5355i -0.0000 - 5.0000i
Column 8
3.5355 - 3.5355i
RESULT:
sliding DFT for a given input sequence is computed using MATLAB
PROGRAM 19:
MATLAB CODE:
%Quantisation Error
clc;
clear all;
L=10000;
x=2*rand(L,1)-1;
Rfs=2;
b=8;
Q=Rfs/2.^b;
y=Q*round(x/Q);
e=x-y;
figure;
subplot(2,1,1);
stem(e(1:100),'.');
title('quantisation error signal');
subplot(2,1,2);
hist(e,10);
colormap([1 1 1]*1);
title('quantisation error histogram');
axis([-Q Q 0 2*L/10]);
PLOT
-2
-4
0 10 20 30 40 50 60 70 80 90 100
1500
1000
500
0
-6 -4 -2 0 2 4 6
-3
x 10
RESULT:
The quantization error of given signal was computed and plotted using MATLAB.
PROGRAM 20:
MATLAB CODE:
%chirp Transform
clc;
clear all;
x=input('enter x');
X=chirpf(x,64,8,32);
function X=chirpf(x,theta,dtheta,k);
N=length(x);
x=reshape(x,1,N);n=0:N-1;
g=x.*exp(-j*(.5*dtheta*n+theta).*n);
L=1;
while(L<N+k-1)
L=2*L;
end
g=[g,zeros(1,L-N)];
h=[exp(j*.5*dtheta*(0:k-1).^2),....
exp(j*.5*dtheta*(-L+k:-1).^2)];
X=ifft(fft(g).*fft(h));
X=x(1:k).*exp(-j*.5*dtheta*(0:k-1).^2);
RESULT:
The Chirp Z-transform for given input sequence was computed using MATLAB.
PROGRAM 21:
MATLAB CODE:
%Taylors
clc;
clear all;
a=input('enter taylors coe');
N=length(a);
A=zeros(N-1,N-1);
m=3;n=N-1-m;
for i=1:m
A(i:(N-1),i)=a(1:N-i);
end
A(1:n,m+(1:n))=-eye(n)
b=-a(2:N);
c=A/b;
Q=[1;c(1:m)];
P=[a(1);c((m+1):(m+n))];
INPUT
enter taylors coe[1 2 3 4]
OUTPUT
A=
1 0 0
2 1 0
3 2 1
RESULT: