⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flix.m

📁 时间序列分析的工具箱,里面有html说明
💻 M
字号:
function Y=flix(D,x)% floating point index - interpolates data in case of non-integer indices%% Y=flix(D,x)%   FLIX returns Y=D(x) if x is an integer %   otherwise D(x) is interpolated from the neighbors D(ceil(x)) and D(floor(x)) % % Applications: % (1)  discrete Dataseries can be upsampled to higher sampling rate   % (2)  transformation of non-equidistant samples to equidistant samples% (3)  [Q]=flix(sort(D),q*(length(D)+1)) calculates the q-quantile of data series D   %% see also: HIST2RES, Y2RES, PLOTCDF, INTERP1%    This program is free software; you can redistribute it and/or modify%    it under the terms of the GNU General Public License as published by%    the Free Software Foundation; either version 2 of the License, or%    (at your option) any later version.%%    This program is distributed in the hope that it will be useful,%    but WITHOUT ANY WARRANTY; without even the implied warranty of%    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%    GNU General Public License for more details.%%    You should have received a copy of the GNU General Public License%    along with this program; if not, write to the Free Software%    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA%	$Revision: 1.7 $%	$Id: trimean.m,v 1.7 2003/09/19 09:30:34 schloegl Exp $%	Copyright (C) 1996-2003 by Alois Schloegl <a.schloegl@ieee.org>	
D  = D(:);Y  = x;k1 = ((x >= 1) & (x <= size(D,1)));	Y(~k1) = NaN;k  = x - floor(x);	% distance to next sample	 ix = ~k & k1; 	        % find integer indicesY(ix) = D(x(ix)); 	% put integer indicesix = k & k1;     	% find non-integer indicesY(ix) = D(floor(x(ix))).*(1-k(ix)) + D(ceil(x(ix))).*k(ix);  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -