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

📄 spline_kezd.m

📁 Incorporating Prior Knowledge in Cubic Spline Approximation - Application to the Identification of R
💻 M
字号:

cav = ca;
cbv = cb;
ccv = cc;

n=length(knots); %number of nodes
nc=3; %number of components
%no hard constr.
A = []; b = [];
An = []; bn = [];
%no soft. constr.
s = [];
lambda1 = 0;
lambda2 = 0;
w = [0 0 0];
sum1 = 0;
sum2 = 0;

%Kiindulasi pont
A = zeros(3,3*2*n);
b = zeros(3,1);
A(1,1) = 1;
A(2,2*n+1) = 1;
A(3,4*n+1) = 1;
b(1) = ca0;
b(2) = cb0;
b(3) = cc0;

A=[];
b=[];

%spline
[spa1,spb1,spc1] = fspline3([tt,tt,tt],[cav,cbv,ccv],knots,s,lambda1,lambda2,w,sum1,sum2,A,b,An,bn);

%Results: t,c
cnew = zeros(length(te),3);
if ~exist('colorstr'),
  cnew(:,1) = drawspline(spa1,te);
  cnew(:,2) = drawspline(spb1,te);
  cnew(:,3) = drawspline(spc1,te);
else
  cnew(:,1) = drawspline(spa1,te,colorstr{1});
  cnew(:,2) = drawspline(spb1,te,colorstr{2});
  cnew(:,3) = drawspline(spc1,te,colorstr{3});
end

⌨️ 快捷键说明

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