フィルターのクリア

creating a matrix with many numbered variables

1 回表示 (過去 30 日間)
Michael
Michael 2011 年 5 月 27 日
i am gathering information from a data file, and i have created a set of variables using a for loop. the variables are var_1, var_2, var_3,..., var_32. Is there a way to create a single column vector using these variables rather than manually typing mat=[var1;var2..etc]? It's not that I am lazy, it's just because the number of variables (in this case 32) will differ with each data file. each variable is simply a string of 'Y' or 'N', and once the matrix is populated i will have to go through and find the Y's, but for now I cannot figure this out. Any help would be great, thanks! and thanks to those who have been consistently helping me this week.

採用された回答

Jan
Jan 2011 年 5 月 27 日
Do not create different variables var_1, var_2 etc, but use a cell: variable{1}, variable{2}, ...

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by