How to write while a set Q is not empty do the following in matlab?
11 ビュー (過去 30 日間)
古いコメントを表示
I want to write this algorithm in matlab:
while Q ≠ ϕ, do
-
-
-
end(do)
0 件のコメント
採用された回答
John D'Errico
2020 年 2 月 17 日
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!