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

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

?? csaps.m

?? 這是一個(gè)整理后比較全面的數(shù)學(xué)建模所用到的基本的十種計(jì)算方法的matlab源代碼!
?? 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一区二区三区免费野_久草精品视频
欧美做爰猛烈大尺度电影无法无天| 欧美自拍丝袜亚洲| 一区二区三区日韩在线观看| 欧美电影免费观看完整版| 99久久精品国产毛片| 蜜桃传媒麻豆第一区在线观看| 亚洲欧美精品午睡沙发| 久久影院午夜片一区| 欧美一区二区三区系列电影| 色94色欧美sute亚洲线路一ni | 中文字幕av一区二区三区免费看| 在线观看日产精品| aaa亚洲精品| 国产一区二区三区不卡在线观看 | 亚洲国产成人av| 中国av一区二区三区| 久久综合色8888| 日韩一二三区视频| 欧美精品日韩综合在线| 91原创在线视频| 成人黄色在线网站| 国产二区国产一区在线观看| 麻豆国产精品官网| 天堂成人国产精品一区| 亚洲高清久久久| 亚洲精品中文在线影院| 国产精品入口麻豆九色| 久久综合久久久久88| 8x福利精品第一导航| 在线成人av影院| 欧美色综合久久| 在线观看视频一区二区欧美日韩| 99久久精品国产一区二区三区| 粉嫩一区二区三区在线看| 国产精品456| 国产精品一区二区久久不卡 | 色哟哟一区二区| 99riav一区二区三区| 成人福利视频网站| 国产69精品久久久久毛片| 国产成人午夜视频| 国产999精品久久| 成人一区二区三区视频| 成人午夜免费av| 不卡电影一区二区三区| 色综合一区二区三区| 91女厕偷拍女厕偷拍高清| 91色porny在线视频| 在线亚洲高清视频| 欧美日韩不卡一区二区| 91精品国产全国免费观看| 日韩欧美综合一区| 久久综合色8888| 国产精品久久久久一区二区三区共| 国产精品福利一区二区| 亚洲日本va午夜在线影院| 亚洲最大的成人av| 丝袜亚洲另类欧美| 九九视频精品免费| 成人一级片网址| 91国产精品成人| 欧美一级二级三级蜜桃| 久久蜜桃av一区二区天堂 | 久久久久久毛片| 欧美国产日韩精品免费观看| 综合欧美一区二区三区| 亚洲成人自拍一区| 精品一区二区三区在线观看国产| 国产99精品国产| 欧美视频一区二区在线观看| 欧美一激情一区二区三区| 久久精品亚洲麻豆av一区二区| 最新日韩av在线| 天天操天天干天天综合网| 黄网站免费久久| 日本高清免费不卡视频| 日韩免费性生活视频播放| 国产精品视频yy9299一区| 午夜在线成人av| 国产精品一二三在| 欧美性三三影院| 久久青草欧美一区二区三区| 一区二区三区欧美日| 国内久久精品视频| 欧美日韩一级二级三级| 久久久久久麻豆| 日韩电影网1区2区| www.在线成人| 精品理论电影在线| 亚洲欧美日韩久久| 黄色小说综合网站| 欧美疯狂做受xxxx富婆| 国产精品久久久久三级| 美女精品一区二区| 色狠狠色噜噜噜综合网| 久久久综合视频| 日韩高清在线电影| 99re8在线精品视频免费播放| 日韩一级二级三级| 亚洲国产精品天堂| 9久草视频在线视频精品| 日韩一区二区三区精品视频| 一区二区三区**美女毛片| 国产精品小仙女| 日韩美女主播在线视频一区二区三区| 亚洲男人天堂av| 丁香天五香天堂综合| 欧美成人一区二区三区在线观看| 夜夜精品浪潮av一区二区三区 | 欧美一区二区三区爱爱| 一区二区三区 在线观看视频| 国产91在线|亚洲| 精品国产欧美一区二区| 亚洲成人777| 色噜噜狠狠一区二区三区果冻| 国产精品视频免费| 国产成人精品1024| 久久久久国产精品厨房| 美日韩一级片在线观看| 宅男在线国产精品| 亚洲高清免费观看 | 欧美丝袜自拍制服另类| 亚洲精品成人悠悠色影视| 成人黄页在线观看| 亚洲国产精品成人综合色在线婷婷 | 亚洲成人免费看| 欧美系列亚洲系列| 亚洲老司机在线| 91国内精品野花午夜精品| 洋洋av久久久久久久一区| 中文字幕不卡的av| 日韩精品一区二区三区中文精品| 一本一道久久a久久精品| 欧美精品欧美精品系列| 香蕉久久一区二区不卡无毒影院| 欧美视频在线一区二区三区 | 大胆亚洲人体视频| 欧美高清在线一区二区| 99国产精品国产精品久久| 亚洲日韩欧美一区二区在线| 91年精品国产| 午夜视频一区在线观看| 51精品视频一区二区三区| 美美哒免费高清在线观看视频一区二区 | 免费的成人av| 久久综合国产精品| 成人av在线资源| 亚洲麻豆国产自偷在线| 欧美综合在线视频| 日韩高清一区在线| 亚洲精品一区二区三区四区高清| 精品一区二区在线免费观看| 中文字幕第一页久久| 91影视在线播放| 亚洲成人av中文| 久久综合九色综合97婷婷女人 | 日韩欧美不卡在线观看视频| 国产一区二区看久久| 国产精品久久久久aaaa樱花| 色欧美88888久久久久久影院| 婷婷一区二区三区| 久久综合一区二区| 91美女蜜桃在线| 免费av网站大全久久| 国产日韩v精品一区二区| 波多野结衣亚洲| 亚洲超碰精品一区二区| 精品sm在线观看| 色婷婷狠狠综合| 蜜桃传媒麻豆第一区在线观看| 日本一区二区成人在线| 欧美色图激情小说| 激情偷乱视频一区二区三区| 亚洲欧洲综合另类| 日韩女优毛片在线| 91在线视频免费观看| 秋霞国产午夜精品免费视频| 中文字幕高清不卡| 51久久夜色精品国产麻豆| 成人午夜av电影| 蜜臀av性久久久久蜜臀aⅴ流畅| 亚洲国产精品ⅴa在线观看| 欧美日韩国产不卡| av高清久久久| 免费成人在线视频观看| 亚洲男同1069视频| 国产午夜精品在线观看| 欧美军同video69gay| youjizz国产精品| 国产一区啦啦啦在线观看| 亚洲综合一二三区| 亚洲国产精品黑人久久久| 欧美一区二区三区四区视频| 在线亚洲高清视频| 高清在线成人网| 精品影院一区二区久久久| 亚洲一区二区中文在线| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 欧美网站一区二区| 波多野结衣在线aⅴ中文字幕不卡|