To use the setIndex method, use one of these syntaxes:
If <index> points beyond the current size of the array, then the array is extended as needed before element
<index> is set. The values of any newly created intermediate elements are undefined.
The name argument is a string with the name of the property.
<value> is a string representation of the value to set. A double array element, for example, can still be set from a string representation of the double, typically used when the property value depends on a model parameter. The values can also be a Boolean or a Boolean array. For example:
This code assigns the value for the element with the third index in the array (because the indices are 0-based) of an array property name to be the value
value. If the parameter later changes, this property changes accordingly. You can also use an additional input argument for a second index value, for a 2-dimensional array (matrix), for example,
This code assigns the value <value> to the (1, 4) element in a matrix.
For double arrays the modifying method is also of use when assigning the value in MATLAB®, if not all arrays have the same length. When using a cell matrix, all rows must have the same length. The method
something.set("name",new String[][]{{"1","2","3"},{"4","5"}})