|
29 | 29 | nix.Dynamic.add_dyn_attr(obj, 'unit', 'rw');
|
30 | 30 | nix.Dynamic.add_dyn_attr(obj, 'expansionOrigin', 'rw');
|
31 | 31 | nix.Dynamic.add_dyn_attr(obj, 'polynomCoefficients', 'rw');
|
32 |
| - nix.Dynamic.add_dyn_attr(obj, 'shape', 'rw'); |
| 32 | + nix.Dynamic.add_dyn_attr(obj, 'dataExtent', 'rw'); |
33 | 33 | end;
|
34 | 34 |
|
35 | 35 | % -----------------
|
@@ -129,6 +129,20 @@ function write_all(obj, data)
|
129 | 129 | function s = datatype(obj)
|
130 | 130 | s = nix_mx('DataArray::dataType', obj.nix_handle);
|
131 | 131 | end
|
132 |
| - |
| 132 | + |
| 133 | + % set data extent enabels to increase the original size |
| 134 | + % of a data array within the same dimensions. |
| 135 | + % e.g. increase the size of a 2D array [5 10] to another |
| 136 | + % 2D array [5 11]. Changing the dimensions is not possible |
| 137 | + % e.g. changing from a 2D array to a 3D array. |
| 138 | + % Furthermore if the extent shrinks the size of an array |
| 139 | + % or remodels the size of an array to a completely different |
| 140 | + % shape, existing data that does not fit into the new shape |
| 141 | + % will be lost! |
| 142 | + function [] = set_data_extent(obj, extent) |
| 143 | + nix_mx('DataArray::setDataExtent', obj.nix_handle, extent); |
| 144 | + % update changed dataExtent in obj.info |
| 145 | + obj.info = nix_mx(strcat(obj.alias, '::describe'), obj.nix_handle); |
| 146 | + end |
133 | 147 | end;
|
134 | 148 | end
|
0 commit comments