Problem 106. Weighted average
Mostra commenti meno recenti
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).
Risposta accettata
Più risposte (1)
VELDANDI THARUN
il 10 Gen 2020
0 voti
function y = weighted_average(x,w)
y =(x*w.')/length(x)
end
Categorie
Scopri di più su Time Series Objects in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!