what is meaning of

3 visualizaciones (últimos 30 días)
Silva Doo
Silva Doo el 16 de Abr. de 2018
Comentada: Walter Roberson el 16 de Abr. de 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});

Respuestas (1)

Image Analyst
Image Analyst el 16 de Abr. de 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 comentario
Walter Roberson
Walter Roberson el 16 de Abr. de 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 .

Iniciar sesión para comentar.

Categorías

Más información sobre Data Types en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by