|
91 | 91 | %-- 1D data arrays created with this function.
|
92 | 92 | %-- e.g. size([1 2 3]) returns shape [1 3], which would not
|
93 | 93 | %-- be accepted when trying to add an alias range dimension.
|
94 |
| - if(shape(1) == 1) |
| 94 | + if (shape(1) == 1) |
95 | 95 | shape(2:size(shape, 2));
|
96 | 96 | end
|
97 | 97 |
|
98 | 98 | errorStruct.identifier = 'Block:unsupportedDataType';
|
99 |
| - if(~isa(datatype, 'nix.DataType')) |
| 99 | + if (~isa(datatype, 'nix.DataType')) |
100 | 100 | errorStruct.message = 'Please provide a valid nix.DataType';
|
101 | 101 | error(errorStruct);
|
102 |
| - elseif(isequal(datatype, nix.DataType.String)) |
| 102 | + elseif (isequal(datatype, nix.DataType.String)) |
103 | 103 | errorStruct.message = 'Writing Strings to DataArrays is not supported as of yet.';
|
104 | 104 | error(errorStruct);
|
105 | 105 | else
|
|
115 | 115 | %-- 1D data arrays created with this function.
|
116 | 116 | %-- e.g. size([1 2 3]) returns shape [1 3], which would not
|
117 | 117 | %-- be accepted when trying to add an alias range dimension.
|
118 |
| - if(shape(1) == 1) |
| 118 | + if (shape(1) == 1) |
119 | 119 | shape = size(data, 2);
|
120 | 120 | end
|
121 | 121 |
|
122 | 122 | errorStruct.identifier = 'Block:unsupportedDataType';
|
123 |
| - if(ischar(data)) |
| 123 | + if (ischar(data)) |
124 | 124 | errorStruct.message = 'Writing Strings to DataArrays is not supported as of yet.';
|
125 | 125 | error(errorStruct);
|
126 |
| - elseif(islogical(data)) |
| 126 | + elseif (islogical(data)) |
127 | 127 | dtype = nix.DataType.Bool;
|
128 |
| - elseif(isnumeric(data)) |
| 128 | + elseif (isnumeric(data)) |
129 | 129 | dtype = nix.DataType.Double;
|
130 | 130 | else
|
131 | 131 | errorStruct.message = 'DataType of provided data is not supported.';
|
|
267 | 267 |
|
268 | 268 | %-- Creating a multitag requires an already existing data array
|
269 | 269 | function r = create_multi_tag(obj, name, type, add_data_array)
|
270 |
| - if(strcmp(class(add_data_array), 'nix.DataArray')) |
| 270 | + if (strcmp(class(add_data_array), 'nix.DataArray')) |
271 | 271 | addID = add_data_array.id;
|
272 | 272 | else
|
273 | 273 | addID = add_data_array;
|
|
0 commit comments