MATLAB: How to expand matrix

matrix

Hi I have matrix 1 row 12225 columns and I want to colerate in with matrix 1 row 12230 columns how to I round them to same length please

Best Answer

You can shorten the second vector by removing the extra elements
A; % 1x12225 vector
B; % 1x12230 vector
B_new = B(1:numel(A));
corrcoef(A, B_new)