How to use If elseif else in array ?
Afficher commentaires plus anciens
I have variables of the image call 'IGray' in picture below

now I want to write the if elseif code to find amount of the value that I separate in 3 ways
- the value < 50
- the value 50-220
- the value > 220
primary, I try to write but it can not . As shown below
which I want ThW, ThWB and ThB show in the workspaces and it can double click to show all variables.

Please help me TT
Thank you very much ^^
3 commentaires
Omer Yasin Birey
le 6 Fév 2019
" I want ThW, ThWB and ThB show in the workspaces and it can double click to show all variables"
Are these 'ThW, ThWB, ThB' some variables. And do you want to display them for each of the IGray variable that satisfies the condition?
Steven Lord
le 6 Fév 2019
Do you want to display ThW in the Command Window once if any of the elements in Threshold_IGray is greater than or equal to 220, once if all the elements in Threshold_IGray is greater than or equal to 220, or a number of times equal to the number of elements in Threshold_IGray that are greater than or equal to 220? You're likely to get a different number of ThW's displayed in each of those three scenarios.
Ajaree Rattanaharn
le 7 Fév 2019
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Performance and Memory dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
