Find the Most Constant Minimum Difference in a 2D array

I have a 2-Dimensional Array where each column refers to a different threshold value. Each row in a given column contains difference (A-B) results between two arrays. What I need to do is find out which of these columns consistently produces the least amount of differences (in other words, A-B stays between C [min] and N[max] for the entirety of the column, but where the values of C and N are unknown).
This question accompanies this older question , however this older question is now irrelevant as the only part of the code I don't know how to figure out yet is this part.

回答 (2 件)

Matt J
Matt J 2016 年 8 月 31 日
編集済み: Matt J 2016 年 8 月 31 日

0 投票

So you're trying to find which column has the minimum span semi-norm?
span=max(A,[],1)-min(A,[],1);
[deltaMin,loc]=min(span);
Image Analyst
Image Analyst 2016 年 8 月 31 日

0 投票

How can C and N be unknown? I can tell you 35% of the elements in column 1 are between 5 and 10 if I know what 5 and 10 are. But if you're not going to tell me 5 and 10, then how am I supposed to know what your lower and upper range values are?
Why does C and N matter anyway? Why can't you just do
columnMeans = mean(abs(array2D), 1)
[leastDiff, colWithLeastDiff] = min(columnMeans)
to find the column that has, on average over all the rows, the least absolute difference?

カテゴリ

ヘルプ センター および File ExchangeOperators and Elementary Operations についてさらに検索

製品

質問済み:

2016 年 8 月 31 日

回答済み:

2016 年 8 月 31 日

Community Treasure Hunt

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

Start Hunting!

Translated by