why this code not displaying else part
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
abdul rehman
il 7 Giu 2020
Commentato: abdul rehman
il 7 Giu 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 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Get Started with MATLAB in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!