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

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

[Octave-bug-tracker] [bug #35860] incorrect interp1 with array first arg


From: David Nijkerk
Subject: [Octave-bug-tracker] [bug #35860] incorrect interp1 with array first argument
Date: Fri, 16 Mar 2012 22:04:00 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.79 Safari/535.11

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

When the first argument is a vector, it must be a column vector in order to
make sense at all. Indeed, interp1((0:4)', 2.5) does not give an error.
To make it pass all the tests, I suggest putting in

if isvector(y)
  y=y(:);
end

before the
x=1:size(y,1);
statement. Not pretty, but it gets the job done.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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