I am writing a code for convolution of rows of a 256×256 matrix with a column vector consisting entirely of ones. But I am getting the error "subscripted assignment dimension mismatch" every time i run the code. Any suggestions ?
for k=1:255 for l=1:k m(:,l) =conv((hkl(l,:))',ones(l,1)); endend
'hkl' is the 256×256 matrix. I want convolve each row of hkl with a column vector of 1s whose length is equal to 'l' and store it in 'm'.
Best Answer