| Simulink Reference | ![]() |
Limitations on Indexing Operations
Matrix indexing operations for a matrix M are supported with limitations for the following types of expressions:
Embedded MATLAB never dynamically allocates memory for the size of the expressions that change as the program executes. The workaround is to use for loops as shown in the following example:
In this case, since i and therefore i+k are not known, memory cannot be allocated for the numerical result. However, memory can be allocated for the following workaround:
In this case, an unkown scalar value i is added to each element of the known index vector 0...k. This means that memory for k+1 elements of M is allocated.
| List of Unsupported Features | Limitations with Complex Numbers | ![]() |
© 1994-2005 The MathWorks, Inc.