フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to make this Lagrange formula vectorized work for all Ln? This is only for L3

1 回表示 (過去 30 日間)
cakey
cakey 2014 年 10 月 21 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
if true
% code
end
function f_handle = make_L3(x_in) x3 = x_in(3); not_x3 = [x_in(1:2), x_in(4:end)];
denominator_values = x3 - not_x3;
denominator = prod(denominator_values);
f_handle = @(x) (prod(x - not_x3) / denominator);
end
The input 3 represents the 3rd element in vector set to be plugged in. How do I modify this formula to give me all of Ln using the same vectorized procedure? Can I just tweak this code somehow?

回答 (0 件)

この質問は閉じられています。

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by