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: Rik
Subject: [Octave-bug-tracker] [bug #45820] linspace() incompatibility with Matlab when N < 2
Date: Wed, 26 Aug 2015 00:25:28 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0

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

Attached is an attempt at a cset for this.  It appears to work.  

One of the things I get from reading the Matlab documentation is that matrices
and vectors are not accepted inputs.  I kind of agree that matrices don't make
much sense.  Maybe we should delete the implementation for that?  On the other
hand, I do kind of like the ability to use vectors.  But if the input is a row
vector, shouldn't the result be expanded down rather than across?  It appears
that the input is always made a column vector before expanding.


linspace ([1 2 3], 4, 3)
ans =

   1.0000   2.5000   4.0000
   2.0000   3.0000   4.0000
   3.0000   3.5000   4.0000




(file #34730)
    _______________________________________________________

Additional Item Attachment:

File name: linspace.cset                  Size:6 KB


    _______________________________________________________

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]