assign numbers to observations
古いコメントを表示
Hi I have a large dataset involving observations of names in a cell like below.
ABC1
AB56
AC46
AC90
I have another dataset "values" that is made up of doubles, with observations for each of the names listed above.
3x8 doubles
3x8 doubles
6x8 doubles
5x8 doubles
The datasets are specifically ordered so that the third observation in "values" has the third name. I want to give each name a number referring to its position in the original vector. E.g. AC90 is the fourth in the list so everywhere AC90 appears, the number 4 is listed.
1 件のコメント
Stephen23
2017 年 4 月 10 日
@matla6123: whatever you do, do not try to create/access variable names dynamically. Dynamically accessing variables names is slow, buggy, and obfuscated way to write code:
採用された回答
その他の回答 (1 件)
Sid Jhaveri
2017 年 4 月 10 日
編集済み: Sid Jhaveri
2017 年 4 月 10 日
0 投票
カテゴリ
ヘルプ センター および File Exchange で Data Type Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!