why this code not displaying else part
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
abdul rehman
le 7 Juin 2020
Commenté : abdul rehman
le 7 Juin 2020
the following code is only displaying the if part even if the value is less than 0.6
y = sprintf('%.1f',rand(1))
if y>0.6
disp('the value is false')
else
disp('true')
end
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrix Indexing 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!