[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #40825] interp1 "linear" fails when x has jump
From: |
Juan Pablo Carbajal |
Subject: |
[Octave-bug-tracker] [bug #40825] interp1 "linear" fails when x has jumps and y is multi-column |
Date: |
Fri, 06 Dec 2013 14:07:34 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?40825>
Summary: interp1 "linear" fails when x has jumps and y is
multi-column
Project: GNU Octave
Submitted by: juanpi
Submitted on: Fri 06 Dec 2013 02:07:33 PM GMT
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: juanpi
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
Hi,
This is somehow related with this bug
https://savannah.gnu.org/bugs/?func=detailitem&item_id=36732
The problem arises when interp1 fixes the input data due to jumps but mkpp
doesn't know about it.
Example
t = [0 1 1 2 3]';
x = t;
ti = [0.5 1.5 2.5]';
interp1(t,x,ti); # works fine (reshape in mkpp line 78 is valid)
interp1(t,[x x],ti); # fails cause length is not multiple of szy(2) (line 252
in interp1)
The removal of jumps in lines 246-250 of interp1.m has to be consistent with
multi-column inputs.
In the next post I will attach a change that may solve the problem. I am
copying the data vector y cause I do not know if forward in the future it is
used, I just followed the same policy as for x (copied to xx)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?40825>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #40825] interp1 "linear" fails when x has jumps and y is multi-column,
Juan Pablo Carbajal <=