How to write while a set Q is not empty do the following in matlab?
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Cantor Set
le 17 Fév 2020
Réponse apportée : John D'Errico
le 17 Fév 2020
I want to write this algorithm in matlab:
while Q ≠ ϕ, do
-
-
-
end(do)
0 commentaires
Réponse acceptée
John D'Errico
le 17 Fév 2020
What function tells you if a vector is empty? (Hint: isempty)
What do you want? Not empty. So what is the logical negation operator in MATLAB? (Hint: ~)
Given that, what would ~isempty(Q) do? How would it help you?
Finally, read the help for while, since it looks like you don't know the basic syntax for a loop in MATLAB.
Essentially, you need to learn MATLAB. Start with the getting started tutorials.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements 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!