Fast Linear Interpolation

버전 1.0.0.0 (3.41 KB) 작성자: Umberto Picchini
Performs linear interpolation with a speed acceleration of (up to) 4x.
다운로드 수: 4.4K
업데이트 날짜: 2006/4/20

라이선스 없음

F = lininterp1f(X,Y,XI,Ydefault) returns the value of the 1-D function Y at the points XI using linear interpolation. Length(F)=length(XI). The vector X specifies the coordinates of the underlying interval. Ydefault is returned for values of XI outside the coordinates in X.
For lininterp1f to work properly:
X must be a monotonically increasing array;
Y must be an array with length(Y)=length(X);
XI must be an array.
Ydefault must be a scalar value or an empty matrix [].

Example:
>> x = [1:1:1000];
>> y =log(sqrt(x+1.001)-1.001);
>> xv =[5:.001:100];
>> yinterp =lininterp1f(x,y,xv,[]);

Warning: not much in the way of error checking, since this slows things down, so pay attention to the argument passed to the function!!!

Installation (Windows users):
------------------------------

Simply copy the lininterp1f.dll file in a directory recognizable by MATLAB. You won't need lininterp1f.c to perform computations, but it is useful if you want to read the user instructions or to customize your code. If you modify lininterp1f.c then you must run the following command

mex lininterp1f.c

in order to obtain the new dll file.

Installation (other OS users):
-------------------------------

You have to compile lininterp1f.c with your favourite C compiler (write "mex -setup" at the MATLAB prompt), then write

mex lininterp1f.c

in order to obtain the corresponding mex-file (see the table below)

OS ---> Extension
------------------------------
sol2, SunOS 5.x ---> .mexsol
hpux ---> .mexhpux
hp700 ---> .mexhp7
ibm_rs ---> .mexrs6
sgi ---> .mexsg
alpha ---> .mexaxp
glnx86 ---> .mexglx

PLEASE RATE MY SUBMISSION!

인용 양식

Umberto Picchini (2024). Fast Linear Interpolation (https://www.mathworks.com/matlabcentral/fileexchange/8627-fast-linear-interpolation), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R13
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Interpolation에 대해 자세히 알아보기
도움

줌: ScaleTime, interp_linear_c

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0

No changes