[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45820] linspace() incompatibility with Matlab
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #45820] linspace() incompatibility with Matlab when N < 2 |
Date: |
Tue, 25 Aug 2015 23:34:19 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0 |
Follow-up Comment #7, bug #45820 (project octave):
Octave gets the single/double distinction correct. Here is a part of the code
in data.cc for Flinspace
octave_value arg_1 = args(0);
octave_value arg_2 = args(1);
if (arg_1.is_single_type () || arg_2.is_single_type ())
{
if (arg_1.is_complex_type () || arg_2.is_complex_type ())
retval = do_linspace<FloatComplexMatrix> (arg_1, arg_2, npoints);
else
retval = do_linspace<FloatMatrix> (arg_1, arg_2, npoints);
}
else
{
if (arg_1.is_complex_type () || arg_2.is_complex_type ())
retval = do_linspace<ComplexMatrix> (arg_1, arg_2, npoints);
else
retval = do_linspace<Matrix> (arg_1, arg_2, npoints);
}
What does Matlab return for this?
x = [1:5]';
linspace (x, 10, 0)
It should be empty, but I wonder if the dimensions are 5x0? Although, I'm not
certain that we need to copy them exactly in that regard.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45820>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #45820] linspace() incampatibility with Matlab, argumento 'N', José Luis García Pallero, 2015/08/25
- [Octave-bug-tracker] [bug #45820] linspace() incompatibility with Matlab, argumento 'N', Philip Nienhuis, 2015/08/25
- [Octave-bug-tracker] [bug #45820] linspace() incompatibility with Matlab when N < 2, Rik, 2015/08/25
- [Octave-bug-tracker] [bug #45820] linspace() incompatibility with Matlab when N < 2, John W. Eaton, 2015/08/25
- [Octave-bug-tracker] [bug #45820] linspace() incompatibility with Matlab when N < 2, Rik, 2015/08/25
- [Octave-bug-tracker] [bug #45820] linspace() incompatibility with Matlab when N < 2, Mike Miller, 2015/08/25
- [Octave-bug-tracker] [bug #45820] linspace() incompatibility with Matlab when N < 2, Mike Miller, 2015/08/25
- [Octave-bug-tracker] [bug #45820] linspace() incompatibility with Matlab when N < 2,
Rik <=
- [Octave-bug-tracker] [bug #45820] linspace() incompatibility with Matlab when N < 2, Rik, 2015/08/25
- [Octave-bug-tracker] [bug #45820] linspace() incompatibility with Matlab when N < 2, Philip Nienhuis, 2015/08/26
- [Octave-bug-tracker] [bug #45820] linspace() incompatibility with Matlab when N < 2, Philip Nienhuis, 2015/08/26
- [Octave-bug-tracker] [bug #45820] linspace() incompatibility with Matlab when N < 2, Guillaume, 2015/08/26
- [Octave-bug-tracker] [bug #45820] linspace() incompatibility with Matlab when N < 2, Rik, 2015/08/26
- [Octave-bug-tracker] [bug #45820] linspace() incompatibility with Matlab when N < 2, Guillaume, 2015/08/26
- [Octave-bug-tracker] [bug #45820] linspace() incompatibility with Matlab when N < 2, Rik, 2015/08/29