Sat 01 Oct 2016 04:41:32 PM UTC, comment #8:
Sebastian, can you comment on what Matlab really does now that 2016b has been released? From their documentation I don't see any reference about disabling automatic broadcasting or getting warnings about it.
From the documentation I found, they don't even make a big fuss about the implicit expansion, it's just part of their normal array operations.
|
Fri 26 Aug 2016 05:34:51 PM UTC, comment #7:
> warning ("error", "Octave:broadcast", "/my/favorite/path/");
>
> One would make broadcast warnings an error but only for functions in "/my/favorite/path/" (and possibly below, this needs to be discussed).
This would be quite a change for 4.2, probably not on time now.
I wonder how much of performance would it cause because it would no longer be just checking for an int. And such change would affect all warnings, and there's warnings for the use of endif, endfor, ! operator, double quotes, etc.
That proposal is quite intuitive but I wonder how to implement it. Anyway, it doesn't like it will go into 4.2 though.
|
Mon 22 Aug 2016 04:30:30 PM UTC, comment #6:
> How would you define user functions?
The user should know, e.g., this syntax would be quite intuitive:
warning ("error", "Octave:broadcast", "/my/favorite/path/");
One would make broadcast warnings an error but only for functions in "/my/favorite/path/" (and possibly below, this needs to be discussed).
Sebastian
|
Mon 22 Aug 2016 04:22:05 PM UTC, comment #5:
> I would also be very glad to make broadcasting raise an error (preferably only for user functions),
How would you define user functions?
I guess Octave functions and packages would not count. But what about m files in the path not written by the user himself but not in a package? Let's say that Agora would be working again, and someone downloads an m function from there. And what about oct files?
How do you think Octave should behave?
|
Mon 22 Aug 2016 03:14:35 PM UTC, comment #4:
I would also be very glad to make broadcasting raise an error (preferably only for user functions), see the discussion here:
http://octave.1599824.n4.nabble.com/Matlab-2016b-introduces-automatic-broadcasting-and-functions-in-scripts-td4679353.html
I am teaching Octave/Matlab courses and broadcasting is a real pain for students. I guess many Octave developers teach Octave and have similar experience.
Sebastian
|
Sat 06 Aug 2016 02:39:07 PM UTC, comment #3:
Lachlan: I agree that we should probably reinstate the separate warning ID for broadcasting, at least for the 4.2 release. Merging the warning with the general matlab-incompatible/language-extension warning seems to have been quite unpopular.
I've looked at your proposal for warnings, but that's fairly complex and I don't see any way of implementing that for 4.2.
|
Sat 15 Aug 2015 12:32:11 AM UTC, comment #2:
Admins, Please re-open this bug. I was going to file a similar one.
Since 4.0.0, the "Octave:broadcast" warning has been merged into the "Octave:language-extension" warning. It is impossible to issue warnings for broadcast without issuing them for legitimate language extensions (i.e., changes in the set of syntactically correct files).
Automatic broadcasting only provides syntactic sugar over using bsxfun, but makes debugging much harder. For example, I frequently deal with lists of numbers. I don't care if they are row vectors or column vectors. Most matlab functions don't care, so I don't. However, when I add a column to a row, I silently get a matrix, which causes an error to appear in an unrelated line of code, possibly very much later.
The patch to restore the warning is trivial, but I assume it was a policy decision. How can I challenge that decision?
|
Fri 14 Aug 2015 02:53:15 PM UTC, comment #1:
This is not an error, it is called broadcasting.
https://www.gnu.org/software/octave/doc/interpreter/Broadcasting.html
Have you disabled the respective warning?
@Admins: please close this bug.
|
Fri 14 Aug 2015 02:49:46 PM UTC, original submission:
Addition of vectors with vectors and vectors with matrices with different dimensions should throw an error, but instead returns invalid results. Example:
|