redo part if script if not happy with the outcome
古いコメントを表示
Hi everyone,
I am doing some data filtering and made a script for it. I am now looking for a way to sort of say 'yes' to the outcome of the script if the outcome is good or redo the script if I the outcome is not good (maybe by using the input() function). Anybody has done this before and can help me out?
2 件のコメント
Dyuman Joshi
2023 年 2 月 24 日
It is difficult to give a clear answer as we don't know what you are trying to do. Please post relevant code and data, and ask/mention specifically what you want to do.
Rik
2023 年 2 月 24 日
I would strongly advise you to consider functions for anything non-trivial. Functions provide a stable interface that allow you to document the purpose along with expected inputs and outputs. That allows modular programming so you can reuse functions later without having to rewrite everything from scratch or copy-pasting code sections until they work.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Programming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!