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 | 50 | 12 | if isstring(args)
|
| | 13 | % convertStringsToChars - Converts a string array to a cell array of char vectors.
|
| | 14 | args = convertStringsToChars(args);
|
< 0.001 | 50 | 15 | elseif iscell(args)
|
| | 16 | % The following converts a cell array containing string arrays to a
|
| | 17 | % cell array of char arrays.
|
0.003 | 50 | 18 | [args{:}] = convertStringsToChars(args{:});
|
< 0.001 | 50 | 19 | end
|
| | 20 |
|
< 0.001 | 50 | 21 | end
|