Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

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

1 visualización (últimos 30 días)
cakey
cakey el 21 de Oct. de 2014
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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?

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by