![]() For example when using images, you often have two variables: one for the image data, and one for the color map. ![]() As remarked in his comment, container maps are a Java-based, unordered, construct, that uses hash-tables for indexing.Ī struct is a different construct, which is C-based and ordered (thanks for the insignt The main use of struct is to help you store data in a more logical way. This is exactly what container maps offer. It would be much more convenient if you could index it with value('Jan'). Here you have an array of values, which you could index as value(1) for January, and so on. Assume however, you have a situation as shown in the following example by Mathworks: For numbers, matrices and so on, where you want to index a specific row number, this is convenient. For example if you have a matrix A and want to index the element in the second row and second column, you will index it using A(2,2). The concepts behind a container map and a struct are quite different:Ī container map is used to create a mapping or indexing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |