# MATLAB: Is it possible to use a function in a vectorization

vectorization

is it at all possible to use function like sum, mean, or sqrt within a vectorization? for example
output(:,3) = sum([ output(:,1) output(:,2) ])
I know that in this case it is simple to just add the two columns without using sum, but I want to use several functions in a more complicated computation, however I can't even get this to work.

a = constantError(:,1)*16-15;    % [1; 17; 33; 49; 65]b = constantError(:,1)*16;       % [16; 32; 48; 64; 80]a:b                              % 1:16
sum(reshape(output(:, 1), 16, []), 1) / 16