bugGNU Octave - Bugs: bug #57450, interp3 horizontal output on...

 
 

bug #57450: interp3 horizontal output on horizontal input

Submitter:  Hg200 <hg200>
Submitted:  Thu 19 Dec 2019 05:29:02 PM UTC
   
 
Category:  Octave Function Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * other Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 20 Dec 2019 05:32:05 PM UTC, comment #4: 

I did some quick checks on slice and isocaps (run demos) + excluding vectors from inverse permutation looks also fine to me.

So thank you for the fast response and solution! This makes things easier.

Hg200 <hg200>
Thu 19 Dec 2019 07:34:21 PM UTC, comment #3: 

That is correct.  The solution was pretty simple so I made it here (https://hg.savannah.gnu.org/hgweb/octave/rev/a57e88065f89).  I checked through the scripts/ directory and made a fix in isocaps.m for the new behavior.  Otherwise, I didn't see any issues with the change.

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Thu 19 Dec 2019 06:24:48 PM UTC, comment #2: 

The behaviour is a bit dangerous. Currently i am writing on a new (missing) octave function. There i have to use interp3. I then multiply the result to one of its input vectors. Because the output is the transpose i obtain a matrix instead of a vector. Unfortunately this results in a wrong result and even worse does not cause an error.

What i want to emphasize is that if interp3 is changed it is most likely a good idea to grep the whole octave folder and see if there is any use of interp3 in some other *.m files. If yes it must be checked if a vector operation is made on the output data. If yes then you have high risk to introduce subsequent bugs.

Hg200 <hg200>
Thu 19 Dec 2019 05:58:29 PM UTC, comment #1: 

Confirmed.  And if you eliminate the transpose on 'u' so that it is a row vector, then the output is a column vector.  In other words, for vector input the output is always the transposed orientation of the input.  Dropping the severity to "Minor".

Rik <rik5>
Group administrator
Thu 19 Dec 2019 05:29:02 PM UTC, original submission:  

running the following code on R2018 gives a column vector but running on octave gives a row vector.


[x, y, z] = meshgrid (1:10);
c = x;

u = linspace (1, 10, 20).';
v = u;
w = u;

interp3 (x, y, z, c, u, v, w)


Hg200 <hg200>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by hg200 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-12-19 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2019-12-19 rik5 Severity3 - Normal 2 - Minor
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code