%%2.
Block Convolution
function [y] = bconvolution(x,h,b)
%UNTITLED8 Summary of this function goes here
% Detailed explanation goes here
w1=length(x);
w2=length(h);
%no. of elements in the convoluted matrix
m=w1+w2-1;
b1=b-1;
b2=b+1;
%no. of blocks to be created
n=w1/b;
%Start variable
s=1;
for i=1:n
%creating blocks
x1= x(s:s+b1);
s=s+b;
%Matrix Method Convolution
y1=lconvolution(x1,h);
if(i==1)
%Appending first created block
y=[y1];
else
%Overlap Addition method
y(b2,1)=y(b2,1)+y1(1,1);
%Appending the created blocks
y=[y;y1(2:b2,1)];
end
end
Not enough input arguments.
Error in bconvolution (line 5)
w1=length(x);
Published with MATLAB® R2015b