Skip to content

Commit 3bd98f4

Browse files
committed
Added inpolygon in ZQ
1 parent a98047f commit 3bd98f4

File tree

6 files changed

+7
-3
lines changed

6 files changed

+7
-3
lines changed

funDef.mat

46 Bytes
Binary file not shown.

funDef.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,9 +860,10 @@ XQ 2 6 3 1 1 1 true true true true str = {'@sum' '@mean' '@(x){sort(x).''}' '@
860860
if numel(in)>=4, in{4} = str2func(str{in{4}}); end; clear str
861861
out{1} = accumarray(in{:});
862862
YQ 1 2 1 1 2 2 true true true true [out{:}] = rat(in{:}); rational approximation \matlab+rat+
863-
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+
863+
ZQ 1 4 2 1 1 2 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+. If $4$ inputs: \matlab+inpolygon+
864864
elseif numel(in)==2, out{1} = polyval(in{:});
865865
elseif numel(in)==3, out{1} = polyfit(in{:});
866+
elseif numel(in)==4, [out{:}] = inpolygon(in{:});
866867
else error('MATL:runtime', 'MATL run-time error: incorrect number of inputs'), end
867868
R 1 2 1 2 1 1 1 true true true true out{1} = triu(in{:}); upper triangular part \matlab+triu+. \sa \matl+XR+.
868869
XR 1 2 1 2 1 1 1 true true true true if numel(in)==1 upper triangular part, above diagonal / build matrix \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+

help.mat

70 Bytes
Binary file not shown.

spec/MATL_spec.pdf

462 Bytes
Binary file not shown.

spec/funDefTable/funDefTable.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
\matl{I} & 0 & 0-- ($^\dagger$) & paste from clipboard I \\
111111
\matl{XI} & 0-- (1) & 0 & copy to clipboard I \\
112112
\matl{YI} & 3--4 (3 / 4) & 1 & \matlab+col2im+. Uses \matlab+'distinct'+ option by default. Second and third inputs may be scalars, and then they are interpreted as numbers of columns. Third input may be a two-vector with product less then the number of elements of first input, and then it is appropriately scaled. This function allows flag strings in fourth input to be replaced by numbers, as follows: 1: \matlab+'distinct'+, 2: \matlab+'sliding'+ \\
113-
\matl{ZI} & 1-- (2 / 3) & 1-- (1) & Depending on numeric last input, calls an image processing function with the remaining inputs. $0$: \matlab+imfill+. If first input is logical or numerical it is converted to char. $1$: \matlab+bwlabeln+. \\
113+
\matl{ZI} & 1-- (2 / 3) & 1-- (1) & Depending on numeric last input, calls an image processing function with the remaining inputs. $0$: \matlab+imfill+. If first input is logical or numerical it is converted to char. $1$: \matlab+bwlabeln+. $2$: \matlab+imdilate+. $3$: \matlab+imerode+. \\
114114
\matl{J} & 0 & 0-- ($^\dagger$) & paste from clipboard J \\
115115
\matl{XJ} & 0-- (1) & 0 & copy to clipboard J \\
116116
\matl{K} & 0 & 0-- ($^\dagger$) & paste from clipboard K \\
@@ -135,7 +135,7 @@
135135
\matl{Q} & 1 & 1 & \matlab|(...)+1| \\
136136
\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)}'+ \\
137137
\matl{YQ} & 1--2 (1) & 1--2 (2) & \matlab+rat+ \\
138-
\matl{ZQ} & 1--3 (2 / 1) & 1 & (i) If $1$ input: \matlab+roots+. (ii) If $2$ inputs: \matlab+polyval+. If $3$ inputs: \matlab+polyfit+ \\
138+
\matl{ZQ} & 1--4 (2 / 1) & 1--2 (1) & (i) If $1$ input: \matlab+roots+. (ii) If $2$ inputs: \matlab+polyval+. If $3$ inputs: \matlab+polyfit+. If $4$ inputs: \matlab+inpolygon+ \\
139139
\matl{R} & 1--2 (1 / 2) & 1 & \matlab+triu+. \sa \matl{XR}. \\
140140
\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} \\
141141
\matl{YR} & 1--2 (1 / 2) & 1 & \matlab+tril+. \sa \matl{ZR}. \\

spec/preLitTable/preLitTableX6.tex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,7 @@
2525
\matl{30} & \matl{'BitsPerSample'} &
2626
\matl{31} & \matl{'BitRate'} &
2727
\matl{32} & \matl{'Quality'} \\ \hline
28+
\matl{33} & \matl{'maximal'} &
29+
\matl{34} & \matl{'ispacked'} &
30+
\matl{35} & \matl{'notpacked'} \\ \hline
2831
\end{longtable}

0 commit comments

Comments
 (0)