octave-maintainers
[Top][All Lists]
Advanced

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

Re: Matlab and broadcasting


From: Nicholas Jankowski
Subject: Re: Matlab and broadcasting
Date: Wed, 30 Aug 2017 22:25:21 -0400

On Aug 30, 2017 5:47 PM, "Rik" <address@hidden> wrote:
I wasn't following things, but apparently since 2016B broadcasting is now a part of Matlab (Octave was here first!).  For example, in the documentation for bsxfun, there is now this

"In MATLAB® R2016b and later, you can directly use operators instead of bsxfun, since the operators independently support implicit expansion of arrays with compatible sizes."

Seems like a good project might be to review Octave's m-file scripts to see if there are places where we are unnecessarily using repmat or ones() in order to create correct dimensions when broadcasting would take care of this and not involve the creation of potentially large temporary variables.

Unfortunately, I see that broadcasting is still not as good as bsxfun for all implementations.  There is this comment in center.m

There was a bit of a discussion on it when it came out. 

http://octave.1599824.n4.nabble.com/Matlab-2016b-introduces-automatic-broadcasting-and-functions-in-scripts-tp4679353.html

how much of an overhead penalty does the ones() trick create? I think I used it a couple times in repelem.  


reply via email to

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