time | Calls | line |
---|
| | 1 | function args = convertStringToCharArgs(args)
|
| | 2 | % This undocumented function may be removed in a future release.
|
| | 3 |
|
| | 4 | % This function converts a cell array containing strings values, or a string
|
| | 5 | % array, to a cell array of character vectors. To convert a scalar string to a
|
| | 6 | % character vector use the char function. This function is necessary
|
| | 7 | % because various functions (like set, get, etc.) do not currently
|
| | 8 | % accept strings.
|
| | 9 |
|
| | 10 | % Copyright 2017 MathWorks, Inc.
|
| | 11 |
|
< 0.001 | 6 | 12 | if isstring(args)
|
| | 13 | % convertStringsToChars - Converts a string array to a cell array of char vectors.
|
| | 14 | args = convertStringsToChars(args);
|
< 0.001 | 6 | 15 | elseif iscell(args)
|
| | 16 | % The following converts a cell array containing string arrays to a
|
| | 17 | % cell array of char arrays.
|
< 0.001 | 6 | 18 | [args{:}] = convertStringsToChars(args{:});
|
< 0.001 | 6 | 19 | end
|
| | 20 |
|
< 0.001 | 6 | 21 | end
|