How do i write RMSE fomula in matlab. K is the length signal

 採用された回答

Chunru
Chunru 2022 年 5 月 24 日
編集済み: Chunru 2022 年 5 月 24 日

0 投票

hrerror = randn(100, 1); % generate some random data
hr_rmse =rms(hrerror) % use rms function
hr_rmse = 1.0289
hr_rmse1 = sqrt(mean(hrerror.^2)) % root-mean-square
hr_rmse1 = 1.0289
% Not recommended
hr_rmse2=0;
K = length(hrerror);
for i=1:K
hr_rmse2 = hr_rmse2 + hrerror(i).^2;
end
hr_rmse2 = sqrt(hr_rmse2/K)
hr_rmse2 = 1.0289

3 件のコメント

Amir Hamzah
Amir Hamzah 2022 年 5 月 24 日
can you manually code like fomula above? btw thank you
Chunru
Chunru 2022 年 5 月 24 日
see above
Amir Hamzah
Amir Hamzah 2022 年 5 月 24 日
Thankkkk youuuu, solved!!!!!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSignal Processing Toolbox についてさらに検索

質問済み:

2022 年 5 月 24 日

コメント済み:

2022 年 5 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by