Skip to content

Commit d7ef83f

Browse files
committed
Two changes to YT
`YT` now has 1 input by default. Output is char if any input is
1 parent 31a914d commit d7ef83f

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

funDef.mat

302 Bytes
Binary file not shown.

funDef.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,11 @@ YS 2 3 2 3 1 1 1 true true true true if numel(in)==3 && numel(in{2})>1 && ndims
943943
ZS 1 1 1 1 1 1 true true true true out{1} = sign(in{:}); sign function \matlab+sign+
944944
T
945945
XT
946-
YT 1 2 2 1 1 1 true true true true out{1} = toeplitz(in{:}); Toeplitz matrix \matlab+toeplitz+
946+
YT 1 2 1 2 1 1 1 true true true true c = any(cellfun(@ischar, in)); Toeplitz matrix \matlab+toeplitz+. Output is char if any input is
947+
for k = 1:numel(in); in{k} = double(in{k}); end
948+
out{1} = toeplitz(in{:});
949+
if c, out{1} = char(out{1}); end
950+
clear c k
947951
ZT
948952
U 1 1 1 1 2 1 true true true true if isnumeric(in{1}) convert char matrix to numeric or to general array / square (i) For char input: \matlab+str2num+ with content checking. Most characters below 32 are replaced by space (as in \matl+D+). The input content is then checked. If it fails, \matlab+[]+ is returned. Else \matlab+str2num+ is applied. If that fails, the input string is evaluated. If that also fails, \matlab+[]+ is returned. The second output is supported in all cases. (ii) For numeric input: \matlab+(...).^2+
949953
out{1} = in{1}.^2;

help.mat

97 Bytes
Binary file not shown.

spec/MATL_spec.pdf

26 Bytes
Binary file not shown.

spec/funDefTable/funDefTable.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
\matl{XS} & 1--2 (1) & 1--2 (1 / 2nd) & \matlab+sortrows+. \sa \matl{S} \\
144144
\matl{YS} & 2--3 (2 / 3) & 1 & \matlab+circshift+. If second input is a scalar and there's no third input, the shift is applied along the first non-singleton dimension. This function also allows first input a 2D array; third input a scalar specifying dimension; and second input a vector or array specifying the shift for each position in the other dimension \\
145145
\matl{ZS} & 1 & 1 & \matlab+sign+ \\
146-
\matl{YT} & 1--2 (2) & 1 & \matlab+toeplitz+ \\
146+
\matl{YT} & 1--2 (1 / 2) & 1 & \matlab+toeplitz+. Output is char if any input is \\
147147
\matl{U} & 1 & 1--2 (1) & (i) For char input: \matlab+str2num+ with content checking. Most characters below 32 are replaced by space (as in \matl{D}). The input content is then checked. If it fails, \matlab+[]+ is returned. Else \matlab+str2num+ is applied. If that fails, the input string is evaluated. If that also fails, \matlab+[]+ is returned. The second output is supported in all cases. (ii) For numeric input: \matlab+(...).^2+ \\
148148
\matl{XU} & 1 & 1 & \matlab+str2double+ \\
149149
\matl{V} & 1--2 (1 / 2) & 1 & \matlab+num2str+. Uses format \matlab+'%.15g '+ by default. To get Matlab's default format use \matlab+[]+ as format specification \\

0 commit comments

Comments
 (0)