怎样实现过固定点的1次线性拟合?。
5 ビュー (過去 30 日間)
古いコメントを表示
採用された回答
tikiceg
2022 年 10 月 28 日
举个例子吧:
x=[1:10]';
y=[ 6.7 8.7 9.8 10.8 12.5 15.1 17.9 20.2 21.5 22.4]'
x=[ones(numel(x),1),x]
opts = optimoptions('lsqlin','Algorithm','active-set');
para=lsqlin(x,y,[],[],[1 6],16,[],[],[],opts)
para(1)是常数项,para(2)是一次项,过点(6,16)
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Interpolation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!