How to write while a set Q is not empty do the following in matlab?

 Respuesta aceptada

John D'Errico
John D'Errico el 17 de Feb. de 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.

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Preguntada:

el 17 de Feb. de 2020

Respondida:

el 17 de Feb. de 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by