access an array from a field inside a structure?
1 回表示 (過去 30 日間)
古いコメントを表示
how to access an array in a field in a structure?
university.student.grades
the grades is a field that has an array that i want to access
2 件のコメント
Stephen23
2019 年 2 月 20 日
What size is the structure university ?
What size is the structure student ?
Bob Thompson
2019 年 2 月 20 日
Stephen's questions are very relevent, as accessing specific information within a structure often requires indexing. Luckily this indexing is fairly similar to indexing within a normal numeric array.
In order to access a specific student's grades, at a specific university, you need to index the structure to find these specific elements.
Ex: bob = university(1,7).student(249,3).grades
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!