diff --git a/funDef.mat b/funDef.mat index 8070ce9..b8c175b 100644 Binary files a/funDef.mat and b/funDef.mat differ diff --git a/funDef.txt b/funDef.txt index 519d267..8e16aad 100644 --- a/funDef.txt +++ b/funDef.txt @@ -1849,7 +1849,7 @@ Zt 3 3 3 1 1 1 true true true true if ischar(in{1}) || iscell(in{1}) replace s if islogical(in{3}), y = logical(y); end out{1} = y; clear t p r m n mem end -u 1 4 1 1 4 1 true true true true str = {'stable' 'sorted' 'last' 'first' 'rows'}; unique \matlab+unique+, with \matlab+'stable'+ option by default. It includes a fourth output with the count for each unique element. It also allows cell array input with numeric content, or mixed char/numeric content. In this case it only works with a single output, either in sorted or stable mode. This function allows flag strings in second and subsequent inputs to be replaced by numbers, as follows: 1: \matlab+'stable'+, 2: \matlab+'sorted'+, 3: \matlab+'last'+, 4: \matlab+'first'+, 5: \matlab+'rows'+. \sa \matl+Xu+ +u 1 4 1 1 4 1 [true false false true] true true true true str = {'stable' 'sorted' 'last' 'first' 'rows'}; unique \matlab+unique+, with \matlab+'stable'+ option by default. It includes a fourth output with the count for each unique element. It also allows cell array input with numeric content, or mixed char/numeric content. In this case it only works with a single output, either in sorted or stable mode. This function allows flag strings in second and subsequent inputs to be replaced by numbers, as follows: 1: \matlab+'stable'+, 2: \matlab+'sorted'+, 3: \matlab+'last'+, 4: \matlab+'first'+, 5: \matlab+'rows'+. \sa \matl+Xu+ for k = 2:numel(in), if isnumeric(in{k}), in(k) = str(in{k}); end; end; clear str if numel(in)==1 || (numel(in)==2 && strcmp(in{2}, 'rows')), in{end+1} = 'stable'; end if iscell(in{1}) && ~all(cellfun(@ischar, in{1})) diff --git a/genHelp.m b/genHelp.m index d851081..64ec3cb 100644 --- a/genHelp.m +++ b/genHelp.m @@ -246,9 +246,11 @@ % necessary (that depends on the function. For `find` it would be necessary, because its first output changes % depending on whether there's a second output or not). So I don't specify case {'[false true false]' '[false,true,false]' '[false, true, false]'} - altOutStr = '2nd'; % It should be specified "2nd of 3" + altOutStr = '2nd'; % It should be specified '2nd of 3' case {'[false false true]' '[false,false,true]' '[false, false, true]'} altOutStr = '3rd'; + case {'[true false false true]' '[true,false,false,true]' '[true, false, false, true]'} + altOutStr = '1st and 4th'; case {'ndims(in{1})'} altOutStr = 'number of dimensions of first input'; otherwise diff --git a/help.mat b/help.mat index 93550e7..9c9ba40 100644 Binary files a/help.mat and b/help.mat differ diff --git a/spec/MATL_spec.aux b/spec/MATL_spec.aux index 98ddffe..82d23dc 100644 --- a/spec/MATL_spec.aux +++ b/spec/MATL_spec.aux @@ -109,7 +109,7 @@ \gdef \LT@i {\LT@entry {1}{23.31676pt}\LT@entry {6}{58.27696pt}\LT@entry - {4}{68.87401pt}\LT@entry + {13}{100.5081pt}\LT@entry {1}{273.29929pt}} \gdef \LT@ii {\LT@entry {1}{23.69952pt}\LT@entry diff --git a/spec/MATL_spec.pdf b/spec/MATL_spec.pdf index 021f44d..b8dfcb7 100644 Binary files a/spec/MATL_spec.pdf and b/spec/MATL_spec.pdf differ diff --git a/spec/funDefTable/funDefTable.tex b/spec/funDefTable/funDefTable.tex index e91533a..2d531b7 100644 --- a/spec/funDefTable/funDefTable.tex +++ b/spec/funDefTable/funDefTable.tex @@ -240,7 +240,7 @@ \matl{Zs} & 1--4 (1 / 2) & 1 & (i) \matlab+std+. (ii) With $2$ inputs \matlab+x+, \matlab+k+ and \matlab+k+ equal to $2$ or $3$, gives \matlab+cov(x, k-2)+. (iii) With $2$ inputs \matlab+x+, \matlab+k+ and \matlab+k+ equal to $4$ or $5$, gives \matlab+skewness(x(:), k-4)+. (iv) With $2$ inputs \matlab+x+, \matlab+k+ and \matlab+k+ equal to $6$ or $7$, gives \matlab+kurtosis(x(:), k-6)+ \\ \matl{t} & 0-- (1) & 0 & duplicate elements in stack. The duplicated elements are those specified as inputs. \sa \matl{y} \\ \matl{Zt} & 3 & 1 & (i) If first input is char or a cell array: \matlab+strrep+. Numerical second and third inputs are converted to char. If the first input is char it is linearized into a row vector. (ii) The first input can be a numerical or logical array (not a cell array of numeric or logical arrays). In this case the other inputs can be char, numeric or logical (not cell); each input array is linearized; result is a row vector; and result has the type of the third input, even if no substitutions have been actually done \\ -\matl{u} & 1--4 (1) & 1--4 (1) & \matlab+unique+, with \matlab+'stable'+ option by default. It includes a fourth output with the count for each unique element. It also allows cell array input with numeric content, or mixed char/numeric content. In this case it only works with a single output, either in sorted or stable mode. This function allows flag strings in second and subsequent inputs to be replaced by numbers, as follows: 1: \matlab+'stable'+, 2: \matlab+'sorted'+, 3: \matlab+'last'+, 4: \matlab+'first'+, 5: \matlab+'rows'+. \sa \matl{Xu} \\ +\matl{u} & 1--4 (1) & 1--4 (1 / 1st and 4th) & \matlab+unique+, with \matlab+'stable'+ option by default. It includes a fourth output with the count for each unique element. It also allows cell array input with numeric content, or mixed char/numeric content. In this case it only works with a single output, either in sorted or stable mode. This function allows flag strings in second and subsequent inputs to be replaced by numbers, as follows: 1: \matlab+'stable'+, 2: \matlab+'sorted'+, 3: \matlab+'last'+, 4: \matlab+'first'+, 5: \matlab+'rows'+. \sa \matl{Xu} \\ \matl{Xu} & 1--3 (1) & 1--4 (1) & \matlab+unique(..., 'rows', ...)+, with \matlab+'stable'+ option by default. It includes a fourth output with the count for each unique row. This function allows flag strings in second and subsequent inputs to be replaced by numbers, as follows: 1: \matlab+'stable'+, 2: \matlab+'sorted'+, 3: \matlab+'last'+, 4: \matlab+'first'+. \sa \matl{u} \\ \matl{Zu} & 2 & 1 & \matlab+strjust+. Strings in second input can be replaced by numbers, as follows: 1: \matlab+'right'+, 2: \matlab+'left'+, 3: \matlab+'center'+ \\ \matl{v} & 0-- ($^\ddagger$ / 2) & 1 & \matlab+vertcat+. If inputs are matrices with non-matching sizes they are linearized \\ diff --git a/spec/latex_tools/MATL_spec.aux b/spec/latex_tools/MATL_spec.aux deleted file mode 100644 index 67cc817..0000000 --- a/spec/latex_tools/MATL_spec.aux +++ /dev/null @@ -1,56 +0,0 @@ -\relax -\providecommand\hyper@newdestlabel[2]{} -\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} -\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined -\global\let\oldcontentsline\contentsline -\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} -\global\let\oldnewlabel\newlabel -\gdef\newlabel#1#2{\newlabelxx{#1}#2} -\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} -\AtEndDocument{\ifx\hyper@anchor\@undefined -\let\contentsline\oldcontentsline -\let\newlabel\oldnewlabel -\fi} -\fi} -\global\let\hyper@last\relax -\gdef\HyperFirstAtBeginDocument#1{#1} -\providecommand\HyField@AuxAddToFields[1]{} -\providecommand\HyField@AuxAddToCoFields[2]{} -\@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{1}{section.1}} -\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}The name}{1}{subsection.1.1}} -\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Notation}{2}{subsection.1.2}} -\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}Examples}{2}{subsection.1.3}} -\newlabel{parte: examples of programs}{{1.3}{2}{Examples}{subsection.1.3}{}} -\@writefile{toc}{\contentsline {section}{\numberline {2}The stack. Data types}{2}{section.2}} -\newlabel{parte: stack. Data types}{{2}{2}{The stack. Data types}{section.2}{}} -\@writefile{toc}{\contentsline {section}{\numberline {3}Statements and separators}{3}{section.3}} -\@writefile{toc}{\contentsline {section}{\numberline {4}Literals}{4}{section.4}} -\newlabel{section: literals}{{4}{4}{Literals}{section.4}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {4.1}Numbers}{4}{subsection.4.1}} -\newlabel{parte: numbers}{{4.1}{4}{Numbers}{subsection.4.1}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {4.2}Numerical arrays}{5}{subsection.4.2}} -\newlabel{parte: numerical arrays}{{4.2}{5}{Numerical arrays}{subsection.4.2}{}} -\@writefile{lot}{\contentsline {table}{\numberline {1}{\ignorespaces Letters used as numbers in arrays\relax }}{6}{table.caption.1}} -\providecommand*\caption@xref[2]{\@setref\relax\@undefined{#1}} -\newlabel{tab: meaning of letters in arrays}{{1}{6}{Letters used as numbers in arrays\relax }{table.caption.1}{}} -\newlabel{parte: array checking}{{4.2}{6}{Numerical arrays}{table.caption.2}{}} -\newlabel{RF1}{7} -\@writefile{lot}{\contentsline {table}{\numberline {2}{\ignorespaces Characters that have special meaning within number literals or array literals\relax }}{7}{table.caption.2}} -\newlabel{tab: characters in arrays}{{2}{7}{Characters that have special meaning within number literals or array literals\relax }{table.caption.2}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {4.3}Logical arrays}{8}{subsection.4.3}} -\newlabel{parte: logical arrays}{{4.3}{8}{Logical arrays}{subsection.4.3}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {4.4}Character arrays}{9}{subsection.4.4}} -\@writefile{toc}{\contentsline {subsection}{\numberline {4.5}Cell arrays}{9}{subsection.4.5}} -\@writefile{toc}{\contentsline {section}{\numberline {5}Functions}{9}{section.5}} -\newlabel{parte: functions}{{5}{9}{Functions}{section.5}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}Normal functions}{10}{subsection.5.1}} -\@writefile{toc}{\contentsline {subsection}{\numberline {5.2}Meta-functions}{11}{subsection.5.2}} -\newlabel{parte: meta-functions}{{5.2}{11}{Meta-functions}{subsection.5.2}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {5.3}Stack rearranging functions}{14}{subsection.5.3}} -\newlabel{parte: stack rearranging functions}{{5.3}{14}{Stack rearranging functions}{subsection.5.3}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {5.4}Clipboard functions}{15}{subsection.5.4}} -\newlabel{parte: clipboard functions}{{5.4}{15}{Clipboard functions}{subsection.5.4}{}} -\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.4.1}Standard clipboards}{15}{subsubsection.5.4.1}} -\newlabel{parte: standard clipboards}{{5.4.1}{15}{Standard clipboards}{subsubsection.5.4.1}{}} -\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.4.2}Automatic clipboards}{17}{subsubsection.5.4.2}} -\new \ No newline at end of file diff --git a/spec/latex_tools/MATL_spec.out b/spec/latex_tools/MATL_spec.out deleted file mode 100644 index e69de29..0000000 diff --git a/spec/latex_tools/MATL_spec.pdf b/spec/latex_tools/MATL_spec.pdf deleted file mode 100644 index 580f79d..0000000 Binary files a/spec/latex_tools/MATL_spec.pdf and /dev/null differ diff --git a/spec/latex_tools/genFunDefTableLatex.m b/spec/latex_tools/genFunDefTableLatex.m index a0347bc..f56e45c 100644 --- a/spec/latex_tools/genFunDefTableLatex.m +++ b/spec/latex_tools/genFunDefTableLatex.m @@ -115,6 +115,8 @@ altOut = '2nd'; case {'[false false true]' '[false,false,true]' '[false, false, true]'} altOut = '3rd'; + case {'[true false false true]' '[true,false,false,true]' '[true, false, false, true]'} + altOut = '1st and 4th'; case {'ndims(in{1})'} altOut = '$^\times$'; otherwise