How to access variables to calculate MSE

1 回表示 (過去 30 日間)
shazwani seth
shazwani seth 2016 年 12 月 6 日
コメント済み: shazwani seth 2016 年 12 月 6 日
How should i write if i need to calculate MSE using the values from the first row in my original variable called ori_bytes and the first row of my compressed variable call comp_bytes? Then the system need to continue calculating MSE until the last row. I have 100 rows in both ori_bytes and comp_bytes

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 12 月 6 日
all_mse = sum((double(ori_bytes) - double(comp_bytes)).^2, 2);
No loop needed.
This assumes that your "comp_bytes" are what has been reconstructed by compression and decompression.
  3 件のコメント
Walter Roberson
Walter Roberson 2016 年 12 月 6 日
That would make sense, yes.
shazwani seth
shazwani seth 2016 年 12 月 6 日
how can I change the value of my data from double to floating? is that even possible? I get my MSE ^11 which is very big. I believe MSE should be ^-ve number right?

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

カテゴリ

Help Center および File ExchangeFile Operations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by