Problem 106. Weighted average
Mostrar comentarios más antiguos
function y = weighted_average(x,w)
f=x.*y;
f=sum(f);
y=f/length(x);
end
is there any error. i submit and get WA(wrong answer).
Respuesta aceptada
Más respuestas (1)
VELDANDI THARUN
el 10 de En. de 2020
0 votos
function y = weighted_average(x,w)
y =(x*w.')/length(x)
end
Categorías
Más información sobre Time Series Objects en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!