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

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

[Octave-bug-tracker] [bug #59856] interpn with vectors: unexpected error


From: Fernando
Subject: [Octave-bug-tracker] [bug #59856] interpn with vectors: unexpected error regarding incompatible size
Date: Tue, 12 Jan 2021 07:18:58 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0

Follow-up Comment #1, bug #59856 (project octave):

I can reproduce the issue both with octave stable and octave default. This
fails:


>> A2=interpn([0,1],[0,1]',[0,0.5;0.5,1],[0,0.5,1],[0,0.5,1]')
error: interpn: incompatible size of argument number 5
error: called from
    interpn at line 178 column 8


but if I add one more value to the last vector, it works:


>> A2=interpn([0,1],[0,1]',[0,0.5;0.5,1],[0,0.5,1],[0,0.5,0.7,1]')
A2 =
        0   0.2500   0.3500   0.5000
   0.2500   0.5000   0.6000   0.7500
   0.5000   0.7500   0.8500   1.0000


If I try the first example without transposing vectors, it does not produce
any error, but the result is incorrect:


>> A2=interpn([0,1],[0,1],[0,0.5;0.5,1],[0,0.5,1],[0,0.5,1])
A2 =
        0   0.5000   1.0000


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59856>

_______________________________________________
  Mensaje enviado vía Savannah
  https://savannah.gnu.org/




reply via email to

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