Skip to content

Octave compatibility for `&)`

Compare
Choose a tag to compare
@lmendo lmendo released this 11 Jan 00:59
· 230 commits to master since this release

Another Matlab / Octave difference has been identified and solved:

Matlab:

y = [1 3 5; 2 4 6]; y([1 3 5]) = []
y =
2 4 6

Octave:

y = [1 3 5; 2 4 6]; y([1 3 5]) = []
y =
2
4
6

The pattern seems to be: if ~isvector(y) Matlab reshapes as a row, whereas Octave reshapes as a column.

This is now solved by explicitly reshaping as a row in that case