time | Calls | line |
---|
| | 179 | function opts = setVariableProps(func,supplied,opts)
|
| | 180 | % Set the numeric only properties
|
< 0.001 | 2 | 181 | types = opts.fast_var_opts.Types;
|
< 0.001 | 2 | 182 | isNumericVar = (types == "double");
|
< 0.001 | 2 | 183 | if any(isNumericVar)
|
< 0.001 | 2 | 184 | props = ["DecimalSeparator","ThousandsSeparator","TrimNonNumeric"];
|
< 0.001 | 2 | 185 | props = getSuppliedProperties(props, supplied);
|
< 0.001 | 2 | 186 | if ~isempty(props)
|
| | 187 | opts.fast_var_opts = opts.fast_var_opts.assignVarOptsProps(func, props, isNumericVar);
|
| 2 | 188 | end
|
< 0.001 | 2 | 189 | end
|
| | 190 | % Set the duration DecimalSeparator
|
< 0.001 | 2 | 191 | isDurationVar = (types == "duration");
|
< 0.001 | 2 | 192 | if supplied.DecimalSeparator && any(isDurationVar)
|
| | 193 | opts.fast_var_opts = opts.fast_var_opts.assignVarOptsProps(func, "DecimalSeparator", isDurationVar);
|
< 0.001 | 2 | 194 | end
|
| | 195 |
|
| | 196 | % set the common properties which can be passed in to
|
| | 197 | % detectImportOptions.
|
< 0.001 | 2 | 198 | props = ["TreatAsMissing","EmptyFieldRule","QuoteRule",...
|
| | 199 | "Prefixes","Suffixes"];
|
< 0.001 | 2 | 200 | props = getSuppliedProperties(props, supplied);
|
< 0.001 | 2 | 201 | if ~isempty(props)
|
| | 202 | opts.fast_var_opts = opts.fast_var_opts.assignVarOptsProps(func, props, 1:opts.fast_var_opts.numVars);
|
< 0.001 | 2 | 203 | end
|
| | 204 |
|
< 0.001 | 2 | 205 | isDateVar = (types == "datetime");
|
< 0.001 | 2 | 206 | if supplied.DateLocale && any(isDateVar)
|
| | 207 | sDateTimeLocale = struct("DatetimeLocale", func.DateLocale);
|
| | 208 | opts.fast_var_opts = opts.fast_var_opts.assignVarOptsProps(sDateTimeLocale, "DatetimeLocale", isDateVar);
|
< 0.001 | 2 | 209 | end
|
< 0.001 | 2 | 210 | end
|
Other subfunctions in this file are not included in this listing.