octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #45820] linspace() incompatibility with Matlab


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #45820] linspace() incompatibility with Matlab when N < 2
Date: Tue, 25 Aug 2015 17:00:27 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.1.0

Follow-up Comment #3, bug #45820 (project octave):

I can't be sure or check now, but I'll bet that the strange behavior matches
some old version of Matlab, even for negative values of N.

For sure, the fact that Matlab returns a 1x0 sized array is a new thing
because old versions of Matlab did not have empty arrays with some non-zero
dimensions.

Also, how does Matlab's linspace work for non-double arguments?  It looks like
Octave doesn't preserve the type of the argument, so a double array is
produced for something like


linspace (uint8(1), uint8(10), uint8(10))


Also, what does Matlab do if the types of the arguments don't match?

I'm guessing that's another compatibility problem that could be a separate bug
report.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45820>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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