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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? csaps.m

?? 數(shù)值類綜合算法 常用數(shù)值計(jì)算工具包(龍貝格算法、改進(jìn)歐拉法、龍格庫塔方法、復(fù)合辛普森)
?? M
字號:
function output = csaps(x,y,p,xx,w)
%pp=csaps(x,y,p)實(shí)現(xiàn)光滑擬合,其中,p為權(quán)因子,0<p<1,p值越大,與數(shù)據(jù)越接近.
%特別地,若p=0, 則為線性擬合,若p=1,則為自然樣條.
%
%CSAPS Cubic smoothing spline.
%
%   VALUES  = CSAPS( X, Y, P [, XX [, W ]])
%
%   Returns the values at XX of the cubic smoothing spline for the
%   given data (X,Y)  and depending on the smoothing parameter P from
%   [0 .. 1] .  This smoothing spline  f  minimizes
%
%   P * sum_i W(i)(Y(i) - f(X(i)))^2  +  (1-P) * integral (D^2 f)^2
%
%   For  P=0, the smoothing spline is the least-squares straight line fit to
%   the data, while, on the other extreme, i.e., for  P=1, it is
%   the `natural' or variational cubic spline interpolant.  The
%   transition region between these two extremes is usually only a
%   rather small range of values for P and its location strongly
%   depends on the data.
%
%   If the argument XX is missing or is empty, the ppform of the cubic
%   smoothing spline is returned instead, for later use with FNVAL, FNDER,
%   etc.
%
%   The default for the weight vector W is ONES(LENGTH(X),1);
%
%   For example, 
%
%      x = linspace(0,2*pi,21); y = sin(x)+(rand(1,21)-.5)*.1;
%      pp = csaps(x,y,.4,[],[ones(1,11), repmat(5,1,10)]);
%
%   returns a smoothed version of the data which is much closer to the data
%   in the right half, because of the much larger weight there.
%
%   It is in general difficult to choose the parameter P without
%   experimentation. For that reason, use of SPAPS is recommended instead
%   since there P is chosen so as to produce the smoothest spline within a
%   specified tolerance of the data.
%
%   It is also possible to smooth data on a rectangular grid and
%   obtain smoothed values on a rectangular grid or at scattered
%   points, by the calls
%
%   VALUES = CSAPS( {X1, ...,Xm}, Y, P, XX [, W ])
%   or
%   PP = CSAPS( {X1, ...,Xm}, Y, P, [, [], W ])
%
%   in which Y is expected to have size [d,length(X1),...,.length(Xm)]
%   (or [length(X1),...,.length(Xm)] if the function is to be scalar-valued),
%   and P is either a scalar or an m-vector,
%   and XX is either a list of m-vectors XX(:,j) or else a cell-array 
%   {XX1, ..., XXm} specifying the m-dimensional grid at which to evaluate
%   the interpolant, and, correspondingly, W, if given, is a cell array of
%   weight sequences for the m dimensions (with an empty Wi indicating the
%   default choice).
%
%   See also SPAPS, CSAPSDEM.

%   Carl de Boor 2 sep 89
%   cb :  9 may '95 (use .' instead of ')
%   cb : 23 oct '95 (use sparse matrices, handle vector-valued ordinates)
%   cb : 09 mar 96 (correct mistake in sparse matrix formula for R)
%   cb : 03 mar 97 (optionally provide a weight vector)
%   cb : 06oct97 (improve the help)
%   cb : 26oct97 (also handle gridded data
%   Copyright (c) 1987-98 by C. de Boor and The MathWorks, Inc.
%   $Revision: 1.5 $

if nargin<4, xx = []; end
if nargin<5, w = []; end
   
if iscell(x)     % we are to handle gridded data

   m = length(x);
   sizey = size(y);
   switch length(sizey)
     case m  % grid values of a scalar-valued function
        sizey = [1 sizey]; y = reshape(y, sizey); 
     case m+1
     otherwise
        error(['If X is a cell-array of length m, then Y must be an ', ...
               'm- or (m+1)-dimensional array.'])
   end
   
   if length(p)~=m, p = repmat(p(1),1,m); end
   if isempty(w), w = cell(1,m); end

   v = y; sizev = sizey;
   for i=m:-1:1   % carry out coordinatewise smoothing
      [b,v,l,k] = ppbrk(csaps1(x{i}, reshape(v,prod(sizev(1:m)),sizev(m+1)),...
                        p(i), [], w{i} ));
      breaks{i} = b;
      sizev(m+1) = l*k; v = reshape(v,sizev);
      if m>1
         v = permute(v,[1,m+1,2:m]); sizev(2:m+1) = sizev([m+1,2:m]);
      end
   end
   % At this point, V contains the tensor-product pp coefficients;
   % It remains to make up the formal description:
   if isempty(xx)
      output = ppmak(breaks, v);
   else
      output = fnval(ppmak(breaks,v),xx);
   end

else             % we have univariate data

   output = csaps1(x,y,p,xx,w);

end


function output = csaps1(x,y,p,xx,w)
n=length(x);[xi,ind]=sort(x);xi=xi(:);
output=[];
if n<2, error('There should be at least two data points.'), end
if all(diff(xi))==0, error('The data abscissae should be distinct.'), end

[yd,yn] = size(y); % if y happens to be a one-column matrix, change it to
                   % a one-row matrix.
if yn==1, yn=yd; y=reshape(y,1,yn); yd=1; end

if n~=yn
   error('Abscissa and ordinate vector should be of the same length.')
end

yi=y(:,ind).'; dd = ones(1,yd);
dx=diff(xi); divdif=diff(yi)./dx(:,dd);
if n==2 % the smoothing spline is the straight line interpolant
   pp=ppmak(xi.',[divdif.' yi(1,:).'],yd);
else % set up the linear system for solving for the 2nd derivatives at  xi .
     % this is taken from (XIV.6)ff of the `Practical Guide to Splines'
     % with the diagonal matrix  D = eye(n,n) .
     % Make use of sparsity of the system.
   R = spdiags([dx(2:n-1), 2*(dx(2:n-1)+dx(1:n-2)), dx(1:n-2)],...
                                         -1:1, n-2,n-2);
   odx=ones(n-1,1)./dx;
   Qt = spdiags([odx(1:n-2), -(odx(2:n-1)+odx(1:n-2)), odx(2:n-1)], ...
                                                0:2, n-2,n);
   % solve for the 2nd derivatives
   if isempty(w), w = ones(n,1); end
   W = spdiags(ones(n,1)./w(:),0,n,n);
   u=(6*(1-p)*Qt*W*Qt.'+p*R)\diff(divdif);
   % ... and convert to pp form
   % Qt.'*u=diff([0;diff([0;u;0])./dx;0])
   yi = yi - ...
    (6*(1-p))*W*diff([zeros(1,yd)
                 diff([zeros(1,yd);u;zeros(1,yd)])./dx(:,dd)
                 zeros(1,yd)]);
   c3 = [zeros(1,yd);p*u;zeros(1,yd)];
   c2=diff(yi)./dx(:,dd)-dx(:,dd).*(2*c3(1:n-1,:)+c3(2:n,:));
   pp=ppmak(xi.',...
     reshape([(diff(c3)./dx(:,dd)).',3*c3(1:n-1,:).',c2.',yi(1:n-1,:).'],...
                                                            (n-1)*yd,4),yd);
end

if isempty(xx)
   output=pp;
else
   output=ppual(pp,xx);
end

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲人被黑人高潮完整版| 亚洲欧洲精品天堂一级 | 国产成人一区二区精品非洲| 国产成人精品三级麻豆| 欧美色图激情小说| 国产精品情趣视频| 久久精品国产精品亚洲红杏| 91麻豆免费在线观看| 精品福利在线导航| 激情五月激情综合网| 欧美性猛交xxxxxx富婆| 国产精品久99| 国产精品12区| 久久综合久久综合亚洲| 青娱乐精品视频在线| 在线亚洲+欧美+日本专区| 久久精品免费在线观看| 免费国产亚洲视频| 911精品国产一区二区在线| 一区二区三区中文字幕电影| 丁香激情综合国产| 欧美tk—视频vk| 人人狠狠综合久久亚洲| 欧美日韩在线播放一区| 一区二区三区影院| 色哟哟欧美精品| 一区二区视频免费在线观看| 99精品国产热久久91蜜凸| 中文字幕精品一区二区精品绿巨人| 久色婷婷小香蕉久久| 欧美一卡二卡在线| 美女精品一区二区| 欧美一区二区三区视频在线观看| 亚洲va欧美va国产va天堂影院| 91官网在线免费观看| 亚洲欧美日韩综合aⅴ视频| av亚洲精华国产精华| 亚洲欧洲色图综合| 91蜜桃视频在线| 亚洲精品国产高清久久伦理二区| 91啪在线观看| 国产成人亚洲精品狼色在线| 国产视频一区不卡| 国产黑丝在线一区二区三区| 国产亚洲午夜高清国产拍精品| 国产高清亚洲一区| 中文字幕精品综合| 色就色 综合激情| 亚洲国产精品一区二区尤物区| 精品视频资源站| 麻豆久久久久久| 久久久www成人免费毛片麻豆| 国产精品一区二区三区四区| 久久九九国产精品| 色综合色狠狠天天综合色| 亚洲第一福利视频在线| 欧美一区二区三区视频在线| 激情文学综合网| 国产精品欧美综合在线| 欧洲视频一区二区| 极品少妇xxxx精品少妇| 国产精品黄色在线观看| 欧美视频一区在线| 国产真实精品久久二三区| 中文字幕日韩一区| 制服视频三区第一页精品| 国产精品夜夜爽| 亚洲精品伦理在线| 亚洲精品在线观| av中文字幕在线不卡| 日本特黄久久久高潮| 国产精品无圣光一区二区| 欧美视频在线一区二区三区 | 日韩欧美国产电影| 国产福利精品一区二区| 亚洲欧美另类综合偷拍| 日韩亚洲欧美高清| 91影院在线观看| 久久精品噜噜噜成人88aⅴ| 国产精品美女久久久久aⅴ| 欧美日韩精品二区第二页| 高清在线不卡av| 麻豆精品一区二区av白丝在线| 亚洲色图在线播放| 久久男人中文字幕资源站| 欧美三级乱人伦电影| k8久久久一区二区三区| 精品在线观看视频| 丝袜脚交一区二区| 亚洲欧美日韩久久| 久久久99精品久久| 久久综合给合久久狠狠狠97色69| 欧美视频一区在线| 99久久久精品| 国产一区二区不卡| 婷婷开心激情综合| 亚洲精品一二三| 国产欧美一区二区三区在线看蜜臀| 欧美日韩国产在线观看| 色综合久久久久综合| 丁香激情综合五月| 成人综合在线视频| 国产精品一区免费视频| 日本中文字幕一区二区视频| 亚洲女爱视频在线| 综合av第一页| 亚洲少妇30p| 亚洲婷婷在线视频| 国产精品短视频| 国产精品欧美综合在线| 国产精品国产三级国产aⅴ原创| 精品久久久久av影院| 日韩亚洲欧美成人一区| 欧美日韩高清一区二区三区| 欧美最猛黑人xxxxx猛交| 97国产精品videossex| 99久久精品免费| 色婷婷综合久久久久中文一区二区| 成人午夜碰碰视频| 成人高清在线视频| 91视频.com| 欧美日韩视频在线观看一区二区三区| 色悠悠久久综合| 精品视频999| 欧美一级高清片| 欧美一二三在线| 日韩精品一区二区三区视频| 26uuu久久天堂性欧美| 国产欧美综合在线观看第十页| 国产精品视频在线看| 亚洲日穴在线视频| 亚洲成人精品一区二区| 日韩av一区二区三区四区| 久久91精品国产91久久小草| 六月婷婷色综合| 国产精品亚洲а∨天堂免在线| www.日韩大片| 欧美人妇做爰xxxⅹ性高电影 | 91女人视频在线观看| 91成人免费网站| 欧美男女性生活在线直播观看| 欧美一区二区三区免费观看视频| 日韩欧美国产麻豆| 中文字幕在线一区| 亚洲一二三四在线| 日韩成人午夜电影| 国产成人在线视频播放| 色伊人久久综合中文字幕| 欧美一区二区三区思思人| 国产精品九色蝌蚪自拍| 亚洲第一综合色| 久久99精品一区二区三区三区| 成人黄色在线视频| 欧美日本在线看| 久久久久久久久久美女| 亚洲精品一二三四区| 久久91精品国产91久久小草| 日本韩国欧美三级| www国产成人免费观看视频 深夜成人网| 欧美经典一区二区| 午夜视频在线观看一区二区| 国产成人午夜片在线观看高清观看| 日本韩国一区二区| 欧美激情中文字幕一区二区| 婷婷综合另类小说色区| 成人av中文字幕| 777精品伊人久久久久大香线蕉| 国产日产欧美一区| 美女性感视频久久| 在线观看日韩av先锋影音电影院| 久久久噜噜噜久噜久久综合| 五月天久久比比资源色| 波多野结衣在线一区| 日韩视频一区二区| 一区二区免费在线| av电影在线不卡| 久久久久久久综合日本| 亚洲一区国产视频| av在线一区二区| 久久久精品中文字幕麻豆发布| 亚洲va国产va欧美va观看| av在线这里只有精品| 中文字幕不卡三区| 国产精品一区二区三区四区| 日韩亚洲欧美综合| 蜜桃视频一区二区三区| 欧美精品日韩一区| 亚洲一区二区在线免费看| 成人性生交大片免费| 久久青草国产手机看片福利盒子| 日本网站在线观看一区二区三区| 欧美日韩一区二区在线观看| 日本一区二区三区免费乱视频| 国产一区欧美一区| 日韩一级免费一区| 免费观看在线色综合| 精品视频一区三区九区| 亚洲成在人线免费| 欧美精品亚洲一区二区在线播放| 亚洲一区二区三区四区五区中文|