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

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

[Octave-bug-tracker] [bug #30295] interp3 input validation needs improve


From: Ben Abbott
Subject: [Octave-bug-tracker] [bug #30295] interp3 input validation needs improvement
Date: Sat, 17 Sep 2011 17:32:59 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.220 Safari/535.1

Follow-up Comment #2, bug #30295 (project octave):

Both  bug #30121, and bug #29601 have been resolved. However, there remain
some problems.

For example, with Matlab ...


>> z = rand (2)

z =

    0.9575    0.1576
    0.9649    0.9706

>> interp2 (z)

ans =

    0.9575    0.5576    0.1576
    0.9612    0.7627    0.5641
    0.9649    0.9677    0.9706


... and with Octave ...


>> z = rand (2)
z =

   0.41641   0.67924
   0.99412   0.22598

>> interp2 (z)
ans = [](0x0)


The 3D problems also persists. Matlab ...


>> z = rand (2,2,2)

z(:,:,1) =

    0.9572    0.8003
    0.4854    0.1419


z(:,:,2) =

    0.4218    0.7922
    0.9157    0.9595

>> interp3 (z)

ans(:,:,1) =

    0.9572    0.8787    0.8003
    0.7213    0.5962    0.4711
    0.4854    0.3136    0.1419


ans(:,:,2) =

    0.6895    0.7429    0.7962
    0.6950    0.6842    0.6735
    0.7006    0.6256    0.5507


ans(:,:,3) =

    0.4218    0.6070    0.7922
    0.6687    0.7723    0.8758
    0.9157    0.9376    0.9595


... and Octave ...


>> z = rand (2,2,2)
z =

ans(:,:,1) =

   0.11037   0.44427
   0.95039   0.84076

ans(:,:,2) =

   0.6432694   0.4045125
   0.0024695   0.4168376

>> interp3 (z)
error: interp3: subscript indices must be either positive integers or
logicals
error: called from:
error:  
/Users/bpabbott/Development/mercurial/default/scripts/general/interp3.m at
line 76, column 3



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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