[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: filling a vector

**From**: |
Mirek Kwasniak |

**Subject**: |
Re: filling a vector |

**Date**: |
Wed, 11 Oct 2000 15:11:58 +0200 |

**User-agent**: |
Mutt/1.0.1i |

On Wed, Oct 11, 2000 at 11:30:27AM +0000, David DS Barnes wrote:
>* Hi again,*
>* *
>* I have a matrix [x,y]*
>* which is not monotonic,*
>* but all I need is to get yi for xi using [x,y]*
>* *
>* obviously I would have used something like*
>* yi = interp1(x,y,xi)*
>* except for this monotonic problem...*
>* *
>* can anybody help here?*
You have to sort (make monotonic) x:
[xs is]=sort(x);
yi=interp1(xs,y(is),xi);
Mirek
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------

**User Function**, *Cederik De Leon A*, `2000/10/10`
**Re: User Function**, *J.C. Gonzalez*, `2000/10/11`
**Re: User Function**, *Teemu Ikonen*, `2000/10/11`
**Re: User Function**, *Jose Carlos Gonzalez*, `2000/10/11`
**RE: User Function**, *Julian A. de Marchi, Ph.D.*, `2000/10/11`
**RE: User Function**, *Peter Gawthrop*, `2000/10/12`
**RE: User Function**, *Julian A. de Marchi, Ph.D.*, `2000/10/12`

**filling a vector**, *David DS Barnes*, `2000/10/11`
**Re: filling a vector**,
*Mirek Kwasniak* **<=**