Problem 106. Weighted average
古いコメントを表示
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).
採用された回答
その他の回答 (1 件)
VELDANDI THARUN
2020 年 1 月 10 日
0 投票
function y = weighted_average(x,w)
y =(x*w.')/length(x)
end
カテゴリ
ヘルプ センター および File Exchange で Time Series Objects についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!