Skip to content

Commit

Permalink
linspace added in ZS
Browse files Browse the repository at this point in the history
  • Loading branch information
lmendo committed Dec 24, 2018
1 parent 30c9036 commit 0a56e76
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 18 deletions.
Binary file modified funDef.mat
Binary file not shown.
4 changes: 3 additions & 1 deletion funDef.txt
Original file line number Diff line number Diff line change
Expand Up @@ -994,11 +994,13 @@ YS 2 3 2 3 1 1 1 true true true true if numel(in)==3 && numel(in{2})>1 && ndims
end
out{1} = y; clear d y
end
ZS 1 2 1 2 1 1 1 true true true true if numel(in)==1 sign function / FFT shift (i) With $1$ input: \matlab+sign+. (ii) With $2$ inputs: \matlab+fftshift+. Second input equal to $0$ corresponds to \matlab+fftshift+ with $1$ input
ZS 1 3 1 3 1 1 1 true true true true if numel(in)==1 sign function / FFT shift / linspace (i) With $1$ input: \matlab+sign+. (ii) With $2$ inputs: \matlab+fftshift+. Second input equal to $0$ corresponds to \matlab+fftshift+ with $1$ input. (iii) With $3$ inputs: \matlab+linspace+
out{1} = sign(in{:});
elseif numel(in)==2
if in{2}==0, in(2) = []; end
out{1} = fftshift(in{:});
elseif numel(in)==3
out{1} = linspace(in{:});
else
error('MATL:runtime', 'MATL run-time error: incorrect number of inputs')
end
Expand Down
Binary file modified help.mat
Binary file not shown.
Binary file modified spec/MATL_spec.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion spec/funDefTable/funDefTable.tex
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
\matl{S} & 1--3 (1) & 1--2 (1 / 2nd) & sort an array (\matlab+sort+) / sort an array based on another. (i) Single-array mode works like Matlab's \matlab+sort+. If $2$ inputs, a negative value of the second input corresponds to descending order. If first input is a cell array and the first cell contains a char array, the rest of the cells' contents are converted to char. (ii) If the first input is a cell array and the first cell contains a numeric array, single-array numeric mode is used. The first input is linearized if it's not a vector, and its contents are linearized for the purposes of sorting. The first input is then sorted in lexicographic order, ignoring other inputs. (iii) In two-array mode, this function takes as first $2$ inputs an array and a vector array which is not char, both with the same number of elements. If the first array is not a vector it is linearized. The second vector is sorted and its order is applied to the first. An optional third input specifies direction as a string, or as a negative number in the non-singleton dimension of the second vector. The outputs are the two sorted arrays. (In two-array mode, if the two input arrays are scalar and the second can be interpreted as a dimension there is no inconsistency with single array mode, as the result is the same). \sa \matl{XS} \\
\matl{XS} & 1--2 (1) & 1--2 (1 / 2nd) & \matlab+sortrows+. \sa \matl{S} \\
\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 \\
\matl{ZS} & 1--2 (1 / 2) & 1 & (i) With $1$ input: \matlab+sign+. (ii) With $2$ inputs: \matlab+fftshift+. Second input equal to $0$ corresponds to \matlab+fftshift+ with $1$ input \\
\matl{ZS} & 1--3 (1 / 3) & 1 & (i) With $1$ input: \matlab+sign+. (ii) With $2$ inputs: \matlab+fftshift+. Second input equal to $0$ corresponds to \matlab+fftshift+ with $1$ input. (iii) With $3$ inputs: \matlab+linspace+ \\
\matl{YT} & 1--2 (1 / 2) & 1 & \matlab+toeplitz+. Output is \matlab+char+ if any input is \\
\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+ \\
\matl{XU} & 1 & 1 & \matlab+str2double+ \\
Expand Down
Binary file modified spec/functionTable/MATL.xlsx
Binary file not shown.
32 changes: 16 additions & 16 deletions spec/functionTable/function_table.eps

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified spec/functionTable/function_table.pdf
Binary file not shown.
Binary file modified spec/functionTable/function_table.pdf.old
Binary file not shown.

0 comments on commit 0a56e76

Please sign in to comment.