フィルターのクリア

how can i create "x" empty vectors to begin refill it?

1 回表示 (過去 30 日間)
Erick Guzman
Erick Guzman 2022 年 6 月 16 日
回答済み: Steven Lord 2022 年 6 月 16 日
i wanna do something like, example:
p=input("please input the number of vector that you want:")
i dont know if use while or for to do this but, the important thing its create x vectors
x1=[ ];
x2=[ ];
x3=[ ];
...
xn=[ ];

採用された回答

Steven Lord
Steven Lord 2022 年 6 月 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.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by