[Numpy-discussion] matlab for numpy users

2009-09-17 Thread Christian K .
Hi, this is probaby an unusual question here from someone used to numpy who is forced to work with matlab and it is not exactly the right place to ask. Sorry for that. Is there something like broadcasting in matlab? E.g. how can I do something like that: a = ones((50,50), dtype=float) time

Re: [Numpy-discussion] matlab for numpy users

2009-09-17 Thread David Cournapeau
Hi Christian, Christian K. wrote: Hi, this is probaby an unusual question here from someone used to numpy who is forced to work with matlab and it is not exactly the right place to ask. Sorry for that. Is there something like broadcasting in matlab? Not really (except for trivial

Re: [Numpy-discussion] matlab for numpy users

2009-09-17 Thread Sturla Molden
Christian K. skrev: Is there something like broadcasting in matlab? Matlab does not do automatic broadcasting like NumPy and Fortran 95. You have to broadcast manually, mostly using repmat (but there are other ways as well). This should help:

Re: [Numpy-discussion] matlab for numpy users

2009-09-17 Thread David Warde-Farley
On 17-Sep-09, at 2:41 AM, David Cournapeau wrote: Not really (except for trivial things like scalar-matrix operations). The usual way to do it in matlab is repmat, which helps you doing 'manual broadcasting'. In recent versions there is also 'bsxfun', which is an awkward way of doing