MATLAB: Element multiplication- question on multiplying row elements

matrix multiplication

if I have a m*n matrix, it is possible to transform it into a m*n-1 matrix where each m row consists of [n0*n1, n1*n2, n2* n3, …n-1*n] ?

Best Answer

x(:,1:end-1).*x(:,2:end)