Any one knows where the error is? Many thanks!
beta=randn(50,1);
bsxfun(@(x1,x2) max([x1 x2 x1+x2]), beta, beta')
error message:
Error using horzcat
Dimensions of matrices being concatenated are not consistent.
Error in @(x1,x2)max([x1,x2,x1+x2])
Here's what I got (using two
max
inbsxfun
)Verifying using
repmat