Answers
The matlab code is given below, Read the comments and execute in the command window
%signal 1
x1= [1 1 1 1 1]
%signal2
x2=[1 1 1 1 1 1 1 1]
%linear convolution of x1 and x2
y=conv(x1,x2)
%8-point circular convolution of x1 and x2
y1=ifft((fft(x1,8).*fft(x2,8)),8)
%8-point circular convolution of x1 and x2
y2=ifft((fft(x1,10).*fft(x2,10)),10)
%%%to plot signals%%%
%to plot x1
n1=0:1:4
stem(n1,x1,'LineStyle','-.',...
'MarkerFaceColor','red',...
'MarkerEdgeColor','green')
figure();
%to plot x2
n2=0:1:7
stem(n2,x2,'LineStyle','-.',...
'MarkerFaceColor','red',...
'MarkerEdgeColor','green')
figure();
%to plot y1
n3=0:1:7
stem(n3,y1,'LineStyle','-.',...
'MarkerFaceColor','red',...
'MarkerEdgeColor','green')
figure();
%to plot y2
n4=0:1:9
stem(n4,y2,'LineStyle','-.',...
'MarkerFaceColor','red',...
'MarkerEdgeColor','green')