annotate general/arrutils/vecop1.m @ 61:eff6bddf82e3
tip
Finally implemented perceptual brightness thing.
author |
samer |
date |
Sun, 11 Oct 2015 10:20:42 +0100 |
parents |
e44f49929e56 |
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
|