카테고리 없음
bsxfun
오늘보다 나은 내일
2016. 6. 24. 14:28
Syntax
C = bsxfun(fun,A,B)
Description
C = bsxfun(fun,A,B)
applies the element-by-element binary operation specified by the function handle fun
to arrays A
and B
, with singleton expansion enabled. fun
can be one of the following built-in functions:
fun = @(A,B) A.*sin(B); A = 1:7; B = pi*[0 1/4 1/3 1/2 2/3 3/4 1].'; C = bsxfun(fun,A,B)