Effacer les filtres
Effacer les filtres

how can i use 'If' statement for this 00000,1000​0,11000,11​100,11110,​11111 six 5bit values using 'OR' logical operator inside IF satement ?

2 vues (au cours des 30 derniers jours)
sir, I am doing project on palm print and finger print authentication using neural network.I have image of palm and finger of the same person.I am taking LLF subband of both images and doing fusion.After fusion I have divided that fused image into matrix of 5*5 block and then calculating the standard deviation of each block.So,I got the 25 standard deviation values for each image and i m using that values as an input to neural network.I have trained the neural network for 6 person with 5 images of each person."00000,10000,11000,11100,11110,11111" this 6 values are identity of each person.As mentioned in question i want to play an audio file which saying access granted and access denied n for that i need if statement using logical 'OR' operator but it shows me this error.
"??? Operands to the || and && operators must be convertible to logical scalar values.
Error in ==> linked at 194 if(O1==00000||10000||11000)" so please tell me the solution how can i do this?

Réponse acceptée

Mischa Kim
Mischa Kim le 3 Mar 2014
Modifié(e) : Mischa Kim le 3 Mar 2014
Use
if (strcmp(O1,'00000') || strcmp(O1,'10000') || strcmp(O1,'11000'))
The three conditions need to be evaluated separately. Also, binary numbers are stored as a string of chars.
  1 commentaire
Ashok
Ashok le 3 Mar 2014
Thank you for your support. But still it showing error while playing .wav file.I m attaching my code with it. Please check the last 5 to 6 lines n tell me how can i get the correct answer??

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by