亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? interp2.m

?? 這是一個整理后比較全面的數學建模所用到的基本的十種計算方法的matlab源代碼!
?? M
?? 第 1 頁 / 共 2 頁
字號:
  t = 1 + (arg5-arg2(1))/(arg2(my)-arg2(1))*(nrows-1);
  
end

if any([nrows ncols]<[2 2]), error('Z must be at least 2-by-2.'); end
if ~isequal(size(s),size(t)),
  error('XI and YI must be the same size.');
end

% Check for out of range values of s and set to 1
sout = find((s<1)|(s>ncols));
if length(sout)>0, s(sout) = ones(size(sout)); end

% Check for out of range values of t and set to 1
tout = find((t<1)|(t>nrows));
if length(tout)>0, t(tout) = ones(size(tout)); end

% Matrix element indexing
ndx = floor(t)+floor(s-1)*nrows;

% Compute intepolation parameters, check for boundary value.
if isempty(s), d = s; else d = find(s==ncols); end
s(:) = (s - floor(s));
if length(d)>0, s(d) = s(d)+1; ndx(d) = ndx(d)-nrows; end

% Compute intepolation parameters, check for boundary value.
if isempty(t), d = t; else d = find(t==nrows); end
t(:) = (t - floor(t));
if length(d)>0, t(d) = t(d)+1; ndx(d) = ndx(d)-1; end
d = [];

% Now interpolate, reuse u and v to save memory.
if nargin==5,
  F =  ( arg3(ndx).*(1-t) + arg3(ndx+1).*t ).*(1-s) + ...
       ( arg3(ndx+nrows).*(1-t) + arg3(ndx+(nrows+1)).*t ).*s;
else
  F =  ( arg1(ndx).*(1-t) + arg1(ndx+1).*t ).*(1-s) + ...
       ( arg1(ndx+nrows).*(1-t) + arg1(ndx+(nrows+1)).*t ).*s;
end

% Now set out of range values to NaN.
if length(sout)>0, F(sout) = NaN; end
if length(tout)>0, F(tout) = NaN; end



%------------------------------------------------------
function F = cubic(arg1,arg2,arg3,arg4,arg5)
%CUBIC 2-D bicubic data interpolation.
%   CUBIC(...) is the same as LINEAR(....) except that it uses
%   bicubic interpolation.
%   
%   This function needs about 7-8 times SIZE(XI) memory to be available.
%
%   See also LINEAR.

%   Clay M. Thompson 4-26-91, revised 7-3-91, 3-22-93 by CMT.

%   Based on "Cubic Convolution Interpolation for Digital Image
%   Processing", Robert G. Keys, IEEE Trans. on Acoustics, Speech, and
%   Signal Processing, Vol. 29, No. 6, Dec. 1981, pp. 1153-1160.

if nargin==1, % cubic(z), Expand Z
  [nrows,ncols] = size(arg1);
  s = 1:.5:ncols; sizs = size(s);
  t = (1:.5:nrows)'; sizt = size(t);
  s = s(ones(sizt),:);
  t = t(:,ones(sizs));

elseif nargin==2, % cubic(z,n), Expand Z n times
  [nrows,ncols] = size(arg1);
  ntimes = floor(arg2);
  s = 1:1/(2^ntimes):ncols; sizs = size(s);
  t = (1:1/(2^ntimes):nrows)'; sizt = size(t);
  s = s(ones(sizt),:);
  t = t(:,ones(sizs));

elseif nargin==3, % cubic(z,s,t), No X or Y specified.
  [nrows,ncols] = size(arg1);
  s = arg2; t = arg3;

elseif nargin==4,
  error('Wrong number of input arguments.');

elseif nargin==5, % cubic(x,y,z,s,t), X and Y specified.
  [nrows,ncols] = size(arg3);
  mx = prod(size(arg1)); my = prod(size(arg2));
  if any([mx my] ~= [ncols nrows]) & ...
     ~isequal(size(arg1),size(arg2),size(arg3))
    error('The lengths of the X and Y vectors must match Z.');
  end
  if any([nrows ncols]<[3 3]), error('Z must be at least 3-by-3.'); end
  s = 1 + (arg4-arg1(1))/(arg1(mx)-arg1(1))*(ncols-1);
  t = 1 + (arg5-arg2(1))/(arg2(my)-arg2(1))*(nrows-1);
  
end

if any([nrows ncols]<[3 3]), error('Z must be at least 3-by-3.'); end
if ~isequal(size(s),size(t)), 
  error('XI and YI must be the same size.');
end

% Check for out of range values of s and set to 1
sout = find((s<1)|(s>ncols));
if length(sout)>0, s(sout) = ones(size(sout)); end

% Check for out of range values of t and set to 1
tout = find((t<1)|(t>nrows));
if length(tout)>0, t(tout) = ones(size(tout)); end

% Matrix element indexing
ndx = floor(t)+floor(s-1)*(nrows+2);

% Compute intepolation parameters, check for boundary value.
if isempty(s), d = s; else d = find(s==ncols); end
s(:) = (s - floor(s));
if length(d)>0, s(d) = s(d)+1; ndx(d) = ndx(d)-nrows-2; end

% Compute intepolation parameters, check for boundary value.
if isempty(t), d = t; else d = find(t==nrows); end
t(:) = (t - floor(t));
if length(d)>0, t(d) = t(d)+1; ndx(d) = ndx(d)-1; end
d = [];

if nargin==5,
  % Expand z so interpolation is valid at the boundaries.
  zz = zeros(size(arg3)+2);
  zz(1,2:ncols+1) = 3*arg3(1,:)-3*arg3(2,:)+arg3(3,:);
  zz(2:nrows+1,2:ncols+1) = arg3;
  zz(nrows+2,2:ncols+1) = 3*arg3(nrows,:)-3*arg3(nrows-1,:)+arg3(nrows-2,:);
  zz(:,1) = 3*zz(:,2)-3*zz(:,3)+zz(:,4);
  zz(:,ncols+2) = 3*zz(:,ncols+1)-3*zz(:,ncols)+zz(:,ncols-1);
  nrows = nrows+2; ncols = ncols+2;
else
  % Expand z so interpolation is valid at the boundaries.
  zz = zeros(size(arg1)+2);
  zz(1,2:ncols+1) = 3*arg1(1,:)-3*arg1(2,:)+arg1(3,:);
  zz(2:nrows+1,2:ncols+1) = arg1;
  zz(nrows+2,2:ncols+1) = 3*arg1(nrows,:)-3*arg1(nrows-1,:)+arg1(nrows-2,:);
  zz(:,1) = 3*zz(:,2)-3*zz(:,3)+zz(:,4);
  zz(:,ncols+2) = 3*zz(:,ncols+1)-3*zz(:,ncols)+zz(:,ncols-1);
  nrows = nrows+2; ncols = ncols+2;
end

% Now interpolate using computationally efficient algorithm.
t0 = ((2-t).*t-1).*t;
t1 = (3*t-5).*t.*t+2;
t2 = ((4-3*t).*t+1).*t;
t(:) = (t-1).*t.*t;
F     = ( zz(ndx).*t0 + zz(ndx+1).*t1 + zz(ndx+2).*t2 + zz(ndx+3).*t ) ...
        .* (((2-s).*s-1).*s);
ndx(:) = ndx + nrows;
F(:)  = F + ( zz(ndx).*t0 + zz(ndx+1).*t1 + zz(ndx+2).*t2 + zz(ndx+3).*t ) ...
        .* ((3*s-5).*s.*s+2);
ndx(:) = ndx + nrows;
F(:)  = F + ( zz(ndx).*t0 + zz(ndx+1).*t1 + zz(ndx+2).*t2 + zz(ndx+3).*t ) ...
        .* (((4-3*s).*s+1).*s);
ndx(:) = ndx + nrows;
F(:)  = F + ( zz(ndx).*t0 + zz(ndx+1).*t1 + zz(ndx+2).*t2 + zz(ndx+3).*t ) ...
       .* ((s-1).*s.*s);
F(:) = F/4;

% Now set out of range values to NaN.
if length(sout)>0, F(sout) = NaN; end
if length(tout)>0, F(tout) = NaN; end


%------------------------------------------------------
function F = nearest(arg1,arg2,arg3,arg4,arg5)
%NEAREST 2-D Nearest neighbor interpolation.
%   ZI = NEAREST(X,Y,Z,XI,YI) uses nearest neighbor interpolation to
%   find ZI, the values of the underlying 2-D function in Z at the points
%   in matrices XI and YI.  Matrices X and Y specify the points at which 
%   the data Z is given.  X and Y can also be vectors specifying the 
%   abscissae for the matrix Z as for MESHGRID. In both cases, X
%   and Y must be equally spaced and monotonic.
%
%   Values of NaN are returned in ZI for values of XI and YI that are 
%   outside of the range of X and Y.
%
%   If XI and YI are vectors, NEAREST returns vector ZI containing
%   the interpolated values at the corresponding points (XI,YI).
%
%   ZI = NEAREST(Z,XI,YI) assumes X = 1:N and Y = 1:M, where
%   [M,N] = SIZE(Z).
%
%   F = NEAREST(Z,NTIMES) returns the matrix Z expanded by interleaving
%   interpolates between every element.  NEAREST(Z) is the same as 
%   NEAREST(Z,1).
%
%   See also INTERP2, LINEAR, CUBIC.

%   Clay M. Thompson 4-26-91, revised 7-3-91 by CMT.

if nargin==1, % nearest(z), Expand Z
  [nrows,ncols] = size(arg1);
  u = ones(2*nrows-1,1)*(1:.5:ncols);
  v = (1:.5:nrows)'*ones(1,2*ncols-1);

elseif nargin==2, % nearest(z,n), Expand Z n times
  [nrows,ncols] = size(arg1);
  ntimes = floor(arg2);
  u = 1:1/(2^ntimes):ncols; sizu = size(u);
  v = (1:1/(2^ntimes):nrows)'; sizv = size(v);
  u = u(ones(sizv),:);
  v = v(:,ones(sizu));

elseif nargin==3, % nearest(z,u,v)
  [nrows,ncols] = size(arg1);
  u = arg2; v = arg3;

elseif nargin==4,
  error('Wrong number of input arguments.');

elseif nargin==5, % nearest(x,y,z,u,v), X and Y specified.
  [nrows,ncols] = size(arg3);
  mx = prod(size(arg1)); my = prod(size(arg2));
  if any([mx my] ~= [ncols nrows]) & (size(arg1)~=size(arg3) |   ...
    size(arg2)~=size(arg3)), 
    error('The lengths of the X and Y vectors must match Z.');
  end
  if all([nrows ncols]>[1 1]),
    u = 1 + (arg4-arg1(1))/(arg1(mx)-arg1(1))*(ncols-1);
    v = 1 + (arg5-arg2(1))/(arg2(my)-arg2(1))*(nrows-1);
  else
    u = 1 + (arg4-arg1(1));
    v = 1 + (arg5-arg2(1));
  end
end

if size(u)~=size(v), error('XI and YI must be the same size.'); end

% Check for out of range values of u and set to 1
uout = (u<.5)|(u>=ncols+.5);
nuout = sum(uout(:));
if any(uout(:)), u(uout) = ones(nuout,1); end

% Check for out of range values of v and set to 1
vout = (v<.5)|(v>=nrows+.5);
nvout = sum(vout(:));
if any(vout(:)), v(vout) = ones(nvout,1); end

% Interpolation parameters
s = (u - round(u));  t = (v - round(v));
u = round(u); v = round(v);

% Now interpolate
ndx = v+(u-1)*nrows;
if nargin==5,
  F = arg3(ndx);
else
  F = arg1(ndx);
end

% Now set out of range values to NaN.
if any(uout(:)), F(uout) = NaN; end
if any(vout(:)), F(vout) = NaN; end

%----------------------------------------------------------
function F = spline2(varargin)
%2-D spline interpolation

% Determine abscissa vectors 
varargin{1} = varargin{1}(1,:);
varargin{2} = varargin{2}(:,1).';

%
% Check for plaid data.
%
xi = varargin{4}; yi = varargin{5};
xxi = xi(1,:); yyi = yi(:,1);
if (size(xi,2)>1 & ~isequal(repmat(xxi,size(xi,1),1),xi)) | ...
   (size(yi,1)>1 & ~isequal(repmat(yyi,1,size(yi,2)),yi)),
  F = splncore(varargin(2:-1:1),varargin{3},varargin(5:-1:4));
else
  F = splncore(varargin(2:-1:1),varargin{3},{yyi(:).' xxi},'gridded');
end

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美剧在线免费观看网站| 亚洲高清三级视频| 亚洲成人av电影| 成人一道本在线| 日韩你懂的在线观看| 中文字幕亚洲区| 韩国v欧美v日本v亚洲v| 欧美日韩免费观看一区三区| 国产精品免费网站在线观看| 精品在线一区二区| 欧美唯美清纯偷拍| 亚洲日本va午夜在线影院| 国产综合成人久久大片91| 欧美久久久久中文字幕| 亚洲精品福利视频网站| 成人免费av在线| 久久久久久影视| 国产一区二区三区久久悠悠色av| 日韩欧美美女一区二区三区| 亚洲精品菠萝久久久久久久| 成人午夜视频在线观看| 国产欧美在线观看一区| 久久国产精品99久久久久久老狼| 亚洲精品视频一区| 高清久久久久久| 久久久久国产精品麻豆ai换脸| 精品福利在线导航| 奇米精品一区二区三区在线观看| 另类小说视频一区二区| 欧美日韩国产一区二区三区地区| 欧美高清hd18日本| 亚洲国产精品久久不卡毛片| 欧美午夜在线一二页| 亚洲成av人片在线| 日韩欧美成人一区| 蜜桃视频一区二区三区| 欧美成人一区二区三区片免费| 337p粉嫩大胆色噜噜噜噜亚洲| 国产农村妇女毛片精品久久麻豆| 国产精品灌醉下药二区| www.66久久| 亚洲欧美日韩在线播放| 色爱区综合激月婷婷| 亚洲图片欧美一区| 欧美男生操女生| 美女一区二区久久| 久久久久久一二三区| av在线一区二区三区| 一区二区成人在线观看| 欧美另类z0zxhd电影| 九九视频精品免费| 日本一区二区三区四区| 色94色欧美sute亚洲线路一ni| 2017欧美狠狠色| 播五月开心婷婷综合| 亚洲一区二区视频| 日韩一区二区高清| 国产精品123区| 一区二区不卡在线播放| 精品第一国产综合精品aⅴ| 国产伦精品一区二区三区免费| 色婷婷综合久久久| 琪琪一区二区三区| 日本一区二区成人| 在线不卡中文字幕| 国产成人免费视频精品含羞草妖精| 欧美妇女性影城| 丰满少妇久久久久久久| 亚洲成人手机在线| 中文字幕精品三区| 欧美电影免费观看高清完整版在线观看 | 成人av资源下载| 亚洲一区二区三区在线播放| 欧美日韩欧美一区二区| 国产999精品久久| 亚洲成av人片在线| 国产精品久久久久久久久搜平片| 久久国产尿小便嘘嘘| 一区二区三区四区五区视频在线观看| 久久99精品久久只有精品| 亚洲欧洲韩国日本视频| 日韩一区二区高清| 92精品国产成人观看免费| 国产美女av一区二区三区| 午夜久久福利影院| 国产精品初高中害羞小美女文| 成人妖精视频yjsp地址| 久久国产精品99久久人人澡| 亚洲色欲色欲www| 国产亚洲人成网站| 日韩欧美电影一二三| 欧美三日本三级三级在线播放| 日韩精品成人一区二区三区| 亚洲天天做日日做天天谢日日欢| caoporen国产精品视频| 国产一区二区三区四| 五月婷婷综合在线| 一区二区三区在线免费播放| 久久亚洲欧美国产精品乐播 | 精品免费国产一区二区三区四区| 日本va欧美va精品发布| 一区二区三区欧美视频| 中文字幕色av一区二区三区| 婷婷久久综合九色综合绿巨人| 欧美美女激情18p| 91高清视频在线| 在线影院国内精品| 色综合久久88色综合天天| 成人免费看黄yyy456| 成人免费视频一区二区| 国产成人av一区二区| 国产电影一区在线| 精品一二三四区| 久久99最新地址| 国产精品一区二区久久精品爱涩| 国产精品国产自产拍高清av| 国产日韩欧美在线一区| 精品国产乱子伦一区| 欧美精品一区二区三区高清aⅴ| av中文字幕不卡| 91视频在线看| 欧美色倩网站大全免费| 欧美午夜在线观看| 538prom精品视频线放| 91精品国产手机| 精品美女在线播放| 久久久久国产成人精品亚洲午夜 | 欧美夫妻性生活| 欧美一区二区三区在线观看视频| 精品一区二区三区久久久| 日本亚洲电影天堂| 国产真实乱子伦精品视频| 国产不卡视频在线观看| 色婷婷av一区二区三区大白胸| 免费黄网站欧美| 国产精品综合一区二区| 99精品视频在线观看| 91免费精品国自产拍在线不卡 | 亚洲精品免费在线播放| 亚洲一级二级三级在线免费观看| 99久久伊人久久99| 色菇凉天天综合网| 精品国产麻豆免费人成网站| 国产精品视频九色porn| 亚洲成人高清在线| 国产精品亚洲午夜一区二区三区| 亚洲成人久久影院| 国产成人亚洲综合a∨婷婷图片| 婷婷中文字幕一区三区| 国产美女精品在线| 亚洲精品一区二区三区福利 | 亚洲欧美韩国综合色| 偷拍日韩校园综合在线| 国产黄色成人av| 欧美日韩精品三区| 国产网站一区二区| 亚洲午夜精品久久久久久久久| 国产精品青草久久| 天堂成人国产精品一区| 国产高清亚洲一区| 91精品国产91久久综合桃花| 国产精品久久久久久妇女6080| 欧美国产禁国产网站cc| 香蕉影视欧美成人| 国产成人亚洲综合a∨猫咪| 欧美美女一区二区三区| 《视频一区视频二区| 精品一区二区三区久久| 欧美亚洲综合另类| 国产精品伦一区| 免费xxxx性欧美18vr| 日本久久一区二区三区| 国产午夜亚洲精品午夜鲁丝片| 久久精品视频免费观看| 亚洲高清在线精品| 波多野结衣91| 精品久久久久久最新网址| 亚洲国产一区二区三区青草影视| 亚洲成a人片综合在线| 成人av动漫网站| 欧美精品一区二| 婷婷国产v国产偷v亚洲高清| 91在线视频18| 国产精品久久久久7777按摩| 国产99精品视频| 香港成人在线视频| 欧美午夜影院一区| 一区二区高清在线| 在线视频你懂得一区| 亚洲美女免费在线| 99r精品视频| 亚洲人成精品久久久久| 色哟哟亚洲精品| 亚洲精品日日夜夜| 一本色道a无线码一区v| 亚洲一区国产视频| 欧美日韩免费视频| 蜜桃视频一区二区三区在线观看| 国产高清不卡二三区| 国产农村妇女毛片精品久久麻豆|