what is meaning of

3 Ansichten (letzte 30 Tage)
Silva Doo
Silva Doo am 16 Apr. 2018
Kommentiert: Walter Roberson am 16 Apr. 2018
What is meaning of
if sum(ones(size(result))-result<=0.05) == 1 && sum(result >= 0.2) == 1
[val, num] = max(result);
str = char(all_Signatures{num});

Antworten (1)

Image Analyst
Image Analyst am 16 Apr. 2018
It says that if there is exactly one number more than 0.95 and less than 1 to find it's value and location. Then it picks a string or number out of a cell array called num, converts it to char (which gives the ascii character if num is a number) and puts it into str.
  1 Kommentar
Walter Roberson
Walter Roberson am 16 Apr. 2018
If there is exactly one number more than 0.95 and exactly one number greater than or equal to 0.2. That would have to be the one value greater than 0.95, but the additional check is ensuring that there is nothing from 0.2 to 0.95 .
There is no limitation that the value must be less than 1, though.
num would correspond to the position of that value that was greater than 0.95 .

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Data Types finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by