why this code not displaying else part

1 vue (au cours des 30 derniers jours)
abdul rehman
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

Réponse acceptée

madhan ravi
madhan ravi le 7 Juin 2020
Remove sprintf()
  13 commentaires
madhan ravi
madhan ravi le 7 Juin 2020
Thanks Steven.
abdul rehman
abdul rehman le 7 Juin 2020
thanks Steven this was the actural issue. and sorry madhan

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB 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