MATLAB: Hello, i have two diffrent sizes arrays and i want to subtract the first element with the first sixty element to the other array and then the secont element with the next sixty elements. How can i do this

subtract

A[16X1] B[1000X1] c=A-B

Best Answer

Taking a wild guess in the dark, perhaps you want something like this?:
>> A = (1:16).';
>> B = (1:1000).';
>> C = [A(1)-B(1:60);A(2)-B(61:120)]
EDIT
OP requested that this be applied to "all the element of the array A":
A = (1:16).';
B = (1:1000).';
N = 60;
M = reshape(B(1:N*numel(A)),N,[]).';
C = bsxfun(@minus,A(:),M);
Note that some elements of B are not used, as 60*16=960, not 1000. You might like to read the bsxfun documentation.
Related Question