Skip to content

Commit

Permalink
Added function YQ (rat: rational approximation)
Browse files Browse the repository at this point in the history
  • Loading branch information
lmendo committed May 15, 2017
1 parent 6014913 commit f68b338
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 6 deletions.
Binary file modified funDef.mat
Binary file not shown.
2 changes: 1 addition & 1 deletion funDef.txt
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ XQ 2 6 3 1 1 1 true true true true str = {'@sum' '@mean' '@(x){sort(x).''}' '@
if numel(in)>=3 && isscalar(in{3}), in = [in(1:2) {[]} in(3:end)]; end
if numel(in)>=4, in{4} = str2func(str{in{4}}); end; clear str
out{1} = accumarray(in{:});
YQ
YQ 1 2 1 1 2 2 true true true true [out{:}] = rat(in{:}); rational approximation \matlab+rat+
ZQ 1 3 2 1 1 1 1 true true true true if numel(in)==1, out{1} = roots(in{1}); polynomial roots / evaluate polynomial / fit polynomial (i) If $1$ input: \matlab+roots+. (ii) If $2$ inputs: \matlab+polyval+. If $3$ inputs: \matlab+polyfit+
elseif numel(in)==2, out{1} = polyval(in{:});
elseif numel(in)==3, out{1} = polyfit(in{:});
Expand Down
Binary file modified help.mat
Binary file not shown.
Binary file modified spec/MATL_spec.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions spec/funDefTable/funDefTable.tex
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
\matl{ZP} & 2--5 (2 / 3) & 1--2 (1) & \matlab+pdist2+. Only predefined distance functions are allowed. This function allows flag strings in the third input to be replaced by numbers, as follows: 1: \matlab+'cityblock'+, 2: \matlab+'hamming'+, 3: \matlab+'chebychev'+, 4: \matlab+'correlation'+, 5: \matlab+'cosine'+, 6: \matlab+'seuclidean'+, 7: \matlab+'minkowski'+, 8: \matlab+'mahalanobis'+, 9: \matlab+'spearman'+, 10: \matlab+'jaccard'+, 11: \matlab+'euclidean'+ \\
\matl{Q} & 1 & 1 & \matlab|(...)+1| \\
\matl{XQ} & 2--6 (3) & 1 & \matlab+accumarray+. If first input is \matlab+char+ it is converted to \matlab+double+. The third input may be omitted, and then it is interpreted as \matlab+[]+. Fourth/third argument specifies an anonymous function, as follows: 1: \matlab+'@sum'+, 2: \matlab+'@mean'+, 3: \matlab+'@(x){sort(x).'}'+, 4: \matlab+'@max'+, 5: \matlab+'@min'+, 6: \matlab+'@prod'+, 7: \matlab+'@(x){x.'}'+, 8: \matlab+'@(x){x}'+, 9: \matlab+'@(x){sort(x)}'+, 10: \matlab+'@(x)x(1)'+, 11: \matlab+'@(x)x(end)'+, 12: \matlab+'@(x){cumsum(x).'}'+, 13: \matlab+'@(x){cumprod(x)}'+, 14: \matlab+'@nansum'+, 15: \matlab+'@nanmean'+, 16: \matlab+'@nanmax'+, 17: \matlab+'@nanmin'+, 18: \matlab+'@(x){cummax(x).'}'+, 19: \matlab+'@(x){cummin(x)}'+, 20: \matlab+'@(x){cummax(x).'}'+, 21: \matlab+'@(x){cummin(x)}'+ \\
\matl{YQ} & 1--2 (1) & 1--2 (2) & \matlab+rat+ \\
\matl{ZQ} & 1--3 (2 / 1) & 1 & (i) If $1$ input: \matlab+roots+. (ii) If $2$ inputs: \matlab+polyval+. If $3$ inputs: \matlab+polyfit+ \\
\matl{R} & 1--2 (1 / 2) & 1 & \matlab+triu+. \sa \matl{XR}. \\
\matl{XR} & 1--2 (1 / 2) & 1 & \matlab+triu(..., 1)+. If $2$ inputs: builds an upper triangular or symmetric matrix from a vector (or from an array in linear order). Second input indicates if the diagonal is filled/not and if the matrix is made symmetric, as follows. 0: don't use diagonal, don't make symmetric. 1: use diagonal, don't make symmetric. 2: don't use diagonal, make symmetric. 3: use diagonal, make symmetric. \sa \matl{R}, \matl{ZR} \\
Expand Down
Binary file modified spec/functionTable/MATL.xlsx
Binary file not shown.
9 changes: 4 additions & 5 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.

0 comments on commit f68b338

Please sign in to comment.