help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

probably simple syntax error, I'm confused by bsxfun error


From: Tim Pierce
Subject: probably simple syntax error, I'm confused by bsxfun error
Date: Fri, 1 Sep 2017 06:49:10 +0100

bsxfun according to the docs applies a function to each element of a vector 

x = [ 1 2 ; 3 4 ; 5 6 ]

bsxfun( @(a,b) (a*b), x(:,1), x(:,2) )

I'd expect

ans =
          2
         12
         30

it gives error

non conformant operators 3x1, 3x1 for operator *



reply via email to

[Prev in Thread] Current Thread [Next in Thread]