Regression with functions handles-Help please!
1 回表示 (過去 30 日間)
古いコメントを表示
Say that
y = a1*f1(x)+ a2* f2(x) + ...+ an*fn(x)
where x and y are column vectors, f1(x),....,fn(x) are function handles at x. How would you solve for the coefficient matrix A using least squares regression?
Here's what I have so far:
function A= MyRegressor(x2,y2,fhs)
for i = 1:numel(fhs)
f = fhs{i}(x2(i));
end
A=f/y2(i)
0 件のコメント
回答 (1 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!