How can I create variable in workspace with a cycle for script?

1 回表示 (過去 30 日間)
Angelo Amoroso
Angelo Amoroso 2017 年 9 月 22 日
コメント済み: Angelo Amoroso 2017 年 9 月 22 日
Hi, I'm trying to create variables in workspace with a "cycle for" script. I'd like to assign to each variable the column name of the input Excel sheet. I thought to use a generic variable in the cycle to assign the input values (txt, num and dates) in n cycle, but I can't save it in ws in a dynamic way. Have you any suggestions? Thanks a lot
Angelo
  1 件のコメント
Stephen23
Stephen23 2017 年 9 月 22 日
"Have you any suggestions?"
Yes, read this very very carefully:
and then keep all of your data in one array. Actually I would suggest that you put all of your data into a table:

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

採用された回答

Jan
Jan 2017 年 9 月 22 日
And now as answer and not as a comment:
Please read the document linked by Stephen very very carefully and if you are not convinced immediately, read it again.
You find 1000 equivalent discussions in this forum and they all have the same solution: Don't do this.
If you find this answer useful, remember that I only point to Stephen's valuable comment, so vote for his thread. Thanks.

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by