フィルターのクリア

How to change the variable name after each run

3 ビュー (過去 30 日間)
MD MAHABUBUR ROHOMAN
MD MAHABUBUR ROHOMAN 2023 年 2 月 16 日
回答済み: Steven Lord 2023 年 2 月 16 日
Hello everyone,
Let's say I have two variables SSD and GND. After I hit the run button for the first time, the program will run and give me the value of SSD1 and GND1. But after the 2nd run, it will give me SSD2 and GND2. After 3rd run, SSD3,GND3. And this will go on. How can I do that?

回答 (1 件)

Steven Lord
Steven Lord 2023 年 2 月 16 日
Can you dynamically create variables with numbered names like x1, x2, x3, etc.? Yes.
Should you do this? The general consensus is no. That Answers post explains why this is generally discouraged and offers several alternative approaches.

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by