Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to find out the minimum error and its index number by comparing two coulmns of matrices?

1 回表示 (過去 30 日間)
AS
AS 2020 年 9 月 28 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have 22 number of traces (sig1 & sig2 ) in two matrices. I have calculated two error matrices E1 (1 by 22) and E2 (1 by 22) for two different matrices of signal contain 22 number of traces. Now, I want to caompare both the error values and take minimum value column wise for each signal and so on. In this way, I want to store the minimum error values for each signal and find out its corresponding trace number. Error I have calculated. Then, how to find out the minimum error comparing two error matrices and its corresponinf traces? Please help me to solve this problem.
for i1=1:1801
for j1=1:22
E1(:,j1)=immse(tr1(:,j1),sig1(:,j1));
E2(:,j1)=immse(tr1(:,j1),sig2(:,j1));
end
end

回答 (1 件)

Ameer Hamza
Ameer Hamza 2020 年 9 月 28 日
編集済み: Ameer Hamza 2020 年 9 月 28 日
You can do something like this
[min_E1, idx_E1] = min(E1);
[min_E2, idx_E2] = min(E2);
min_E1 is the minimum value, and idx_E1 is the index at which the minimum value occurs.

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by