(
Jump to the original submission)
Thu 29 Dec 2016 05:07:09 PM UTC, comment #9:
I wanted to know whether ranges could be of different types.
In Octave, there is a range type that stores only the base, limit, and increment as double precision floating point values.
I think that in Matlab, the range syntax is just a way of creating a matrix and that there is no compact internal storage for them, though ranges used in for loops may get special treatment.
It doesn't appear to me that the issue is fixed because
"works" in Matlab by setting the upper limit of the loop range to the maximum value for an int64 value. In Octave, it is still an error.
|
Wed 28 Dec 2016 10:41:48 PM UTC, comment #8:
Is this issue still present in Octave 4.2.0?
When I understand comment #3 correctly, then the original (Matlab incompatibility) issue is already "fixed", because recent Matlab versions (R2015a) behave the same as Octave does in this respect.
But I have not understood the reasoning behind comment #6 and comment #7. Is this about the same issue?
|
Wed 24 Jun 2015 07:43:37 PM UTC, comment #7:
|
Wed 24 Jun 2015 06:59:34 PM UTC, comment #6:
What happens in Matlab for the following?
|
Tue 26 May 2015 03:10:39 PM UTC, comment #5:
|
Wed 20 May 2015 09:45:42 AM UTC, comment #4:
Oops, I meant leaving Octave as it is, not Matlab.
|
Wed 20 May 2015 08:50:36 AM UTC, comment #3:
Right. In Matlab R2015a for 1:Inf is not
equivalent to while (1). So, it would
appear that leaving Matlab as it is is the
better choice.
|
Wed 20 May 2015 01:00:50 AM UTC, comment #2:
I got someone to confirm this with a recent version of Matlab.
Assignment to a variable does fail with an error about it being too large to be allocated.
Looping over the range does work, but it also prints a warning about the range being truncated to 9223372036854775807 (which is intmax("int64")).
|
Tue 19 May 2015 07:19:05 PM UTC, comment #1:
Confirmed, although since there are easy workarounds like using while(1) I've lowered the priority on this bug.
I assume Matlab only accepts Inf in ranges in this one special case. Does this fail?
|
Tue 19 May 2015 05:59:26 PM UTC, original submission:
The Inf function in Matlab can be used to generate infinite ranges and these are used to create infinite loops. That is
is equivalent to
This form of looping is currently not allowed in Octave.
|
(Note: upload size limit is set to 16384 kB, after insertion of the required
escape characters.)
Attach File(s):
Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one
Digest:
bug dependencies.
Follow 7 latest changes.