フィルターのクリア

naming of a variable

2 ビュー (過去 30 日間)
monika mangla
monika mangla 2016 年 7 月 26 日
コメント済み: Stephen23 2016 年 7 月 26 日
how can i have a variable name to be as name1 name2 name3 upto namen. i can't use array for this. i want something like for i = 1:1:n namei = "something"; end
  1 件のコメント
Stephen23
Stephen23 2016 年 7 月 26 日
"i can't use array for this"
Why not ?

サインインしてコメントする。

回答 (1 件)

Guillaume
Guillaume 2016 年 7 月 26 日
" i can't use array for this."
Yes you can, and you should. The array can be a cell array. You could also use a map
There is absolutely zero upside and lots of downside in having sequential variable names. They're obviously related, so they should be grouped together in a container.
See the FAQ for the various options.

カテゴリ

Help Center および File ExchangeData Types についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by