could anyone help me how to compute the mean square error between two cell.
1 回表示 (過去 30 日間)
古いコメントを表示
I am having two cell A and B in the attached data.mat.
I want to compute the mean square error between A and B in data.mat.
Could anyone please help me on this.
2 件のコメント
Yazan
2021 年 7 月 17 日
How are you defining the MSE for your data? Each cell of A and B is a N-by-2 vector.
採用された回答
Walter Roberson
2021 年 7 月 17 日
cellfun(@(a,b) sqrt(sum(a(:)-b(:)).^2))
You had the wrong definition of mean square error.
10 件のコメント
Walter Roberson
2021 年 7 月 18 日
Please show the output of the following:
cellfun(@(a)string(class(a)), A)
cellfun(@(a)string(class(a)), B)
I suspect your A and B are not cell array of double like you indicate here. Judging by some of your other posts, I suspect that you have a mix, that some of the entries are double and others are cell.
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!