annotate general/arrutils/vecop1.m @ 4:e44f49929e56

Adding reorganised general toolbox, now in several subdirectories.
author samer
date Sat, 12 Jan 2013 19:21:22 +0000
parents
children
rev   line source
samer@4 1 function Z=vecop1(F,X,Y)
samer@4 2 % vecop1 - apply binary function to different sized arrays
samer@4 3 %
samer@4 4 % vecop1 ::
samer@4 5 % ([[D]],[[D]]->[[D]]) ~'some function requiring equal size args',
samer@4 6 % [[DX]] ~'first arg of size DX',
samer@4 7 % [[DY]] ~'second arg of size DY'
samer@4 8 % -> [[DX]] ~'result of size DX' :- all(DX>=DY).
samer@4 9 %
samer@4 10 % this is a slightly simpler version of vecop that assumes that the
samer@4 11 % first argument is at least as big as the second in every dimension.
samer@4 12 Z=feval(F,X,repmat_to(Y,size(X)));
samer@4 13