Changeset 26337 in project
 Timestamp:
 04/02/12 05:52:04 (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

wiki/eggref/4/interp1d
r20190 r26337 13 13 == Documentation 14 14 15 The {{interp1d}} library provides routines for linear and piecewise quadratic interpolation, as well as a facility for "sliding window" interpolation over a long, or possibly infinite, sequence of data. 15 The {{interp1d}} library provides routines for linear and piecewise 16 quadratic interpolation, as well as a facility for "sliding window" 17 interpolation over a long, or possibly infinite, sequence of data. 16 18 17 19 === Procedures … … 19 21 <procedure>interp1d:nearest:: XDATA * YDATA * X > Y</procedure> 20 22 21 Interpolates function {{y=f(x)}} at the point {{x}} using the data point nearest to {{x}}. Arguments {{XDATA}} and {{YDATA}} are lists of numeric values that correspond to sample points of the function being interpolated. Argument {{X}} must be within the range of values contained in {{XDATA}}. 23 Interpolates function {{y=f(x)}} at the point {{x}} using the data 24 point nearest to {{x}}. Arguments {{XDATA}} and {{YDATA}} are lists of 25 numeric values that correspond to sample points of the function being 26 interpolated. Argument {{X}} must be within the range of values 27 contained in {{XDATA}}. 22 28 23 29 … … 25 31 <procedure>interp1d:linear:: XDATA * YDATA * X > Y</procedure> 26 32 27 Interpolates function {{y=f(x)}} at the point {{x}} using the linear interpolation method. Arguments {{XDATA}} and {{YDATA}} are lists of numeric values that correspond to sample points of the function being interpolated. Argument {{X}} must be within the range of values contained in {{XDATA}}. 33 Interpolates function {{y=f(x)}} at the point {{x}} using the linear 34 interpolation method. Arguments {{XDATA}} and {{YDATA}} are lists of 35 numeric values that correspond to sample points of the function being 36 interpolated. Argument {{X}} must be within the range of values 37 contained in {{XDATA}}. 28 38 29 39 … … 31 41 <procedure>interp1d:piecewisequadratic:: XDATA * YDATA * X > Y</procedure> 32 42 33 Interpolates function {{y=f(x)}} at the point {{x}} using the piecewise quadratic interpolation method. Arguments {{XDATA}} and {{YDATA}} are lists of numeric values that corresponds to sample points of the function being interpolated. Argument {{X}} must be within the range of values contained in {{XDATA}}. 43 Interpolates function {{y=f(x)}} at the point {{x}} using the 44 piecewise quadratic interpolation method. Arguments {{XDATA}} and 45 {{YDATA}} are lists of numeric values that corresponds to sample 46 points of the function being interpolated. Argument {{X}} must be 47 within the range of values contained in {{XDATA}}. 34 48 35 49 … … 37 51 <procedure>interp1d:fromsequence:: METHOD * STEP * YDATA [* START * CAR * CDR * NULL? * DELTAWINDOWLEN * MAXWINDOWLEN] > (LAMBDA X > Y)</procedure> 38 52 39 Constructs a sliding window interpolation procedure, for a given sequence {{YDATA}} that contains uniformly sampled values of a function {{y = f(x)}}, where {{X}} has an initial value of {{START}} (default 0) and is incremented by {{STEP}} amount. The returned procedure performs interpolation using the given {{METHOD}} procedure, while the window is shifted forwards by the appropriate amount if {{X}} is outside the current window range. Backward shifting is not supported. 53 Constructs a sliding window interpolation procedure, for a given 54 sequence {{YDATA}} that contains uniformly sampled values of a 55 function {{y = f(x)}}, where {{X}} has an initial value of {{START}} 56 (default 0) and is incremented by {{STEP}} amount. The returned 57 procedure performs interpolation using the given {{METHOD}} procedure, 58 while the window is shifted forwards by the appropriate amount if 59 {{X}} is outside the current window range. Backward shifting is not 60 supported. 40 61 41 62 Argument {{METHOD}} is one of the interpolation procedures above. … … 43 64 Optional argument {{START}} specifies the initial (smallest) {{X}} and defaults to 0. 44 65 45 Optional arguments {{CAR}}, {{CDR}}, {{NULL?}} are used to access {{YDATA}} and default to the standard list procedures. If the input sequence is not a list (e.g. an SRFI40 stream), these arguments can be used to specify the appropriate accessors and predicates. 66 Optional arguments {{CAR}}, {{CDR}}, {{NULL?}} are used to access 67 {{YDATA}} and default to the standard list procedures. If the input 68 sequence is not a list (e.g. an SRFI40 stream), these arguments can 69 be used to specify the appropriate accessors and predicates. 46 70 47 71 Optional arguments {{DELTAWINDOWLEN}} and {{MAXWINDOWLEN}} specify the window increment (default 4) and maximum window size (default 128). … … 70 94 === Version history 71 95 96 ; 1.12 : Eliminated dependency on easyffi 72 97 ; 1.11 : Documentation converted to wiki format 73 98 ; 1.10 : Ported to Chicken 4 … … 86 111 === License 87 112 88 Copyright 2007201 0Ivan Raikov and the Okinawa Institute of Science and Technology113 Copyright 20072012 Ivan Raikov and the Okinawa Institute of Science and Technology 89 114 90 115 This program is free software: you can redistribute it and/or modify
Note: See TracChangeset
for help on using the changeset viewer.