coeff.m
来自「good code for matlab by mili , i than yo」· M 代码 · 共 24 行
M
24 行
% This file calculates the Bezier coefficient Matrix
% based on the order of the curve - oc
% it returns a (oc + 1) * (oc + 1) matrix
function returnvalue = coeff(oc)
% initialize the vector
for i = 1:oc + 1
for j = 1:oc + 1
A(i,j) = 0.0;
end
end
for i = 0:oc
ii = i + 1;
for j = 0:oc - i
jj = j + 1;
A(ii,jj) = Combination(oc,j)*Combination(oc - j,oc -i-j)*(-1)^(oc-i-j);
end
end
returnvalue =A;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?