2012-08-04から1日間の記事一覧

R言語のapply関数に相当するものはMatlabにあるか

bsxfunやnum2cellを工夫して使うのが1つの方法のようだ。 function ret = apply_rs1( imat, margin, ifunc) %R-like apply function but be careful, the output may be different from that of R. % % Ex. % apply_rs1(m, 1, @(x) x - mean(x)) ... Equival…