Skip to content

Commit

Permalink
Corrected documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
lmendo committed Mar 5, 2020
1 parent c881c96 commit 053509b
Show file tree
Hide file tree
Showing 7 changed files with 267 additions and 2 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 @@ -1641,7 +1641,7 @@ Yn 1 5 2 4 1 1 1 true true true true if numel(in)==1 interpolation (table looku
out{1} = interp1(in{:});
end
Zn
o 1 3 1 2 1 1 1 true true true true if ~iscell(in{1}) && numel(in)==1 convert to double precision array / modulo 2 (i) With one non-cell array, non-double input: \matlab+double+. (ii) For cell array input behaves similarly to \matlab+char+: linearizes cell array, converts cell contents to \matlab+double+ and concatenates vertically, padding if needed. By default, padding is with zeros on the right. Optional second input indicates fill side: left if it evaluates to \matlab+false+, right if it evaluates to \matlab+true+. Third optional input specifies fill value. (iii) With one input of type \matlab+double+: \matlab+mod(..., 2)+
o 1 3 1 2 1 1 1 true true true true if ~iscell(in{1}) && numel(in)==1 convert to double precision array / modulo 2 (i) With one non-cell array, non-\matlab+double+ input: \matlab+double+. (ii) For cell array input behaves similarly to \matlab+char+: linearizes cell array, converts cell contents to \matlab+double+ and concatenates vertically, padding if needed. By default, padding is with zeros on the right. Optional second input indicates fill side: left if it evaluates to \matlab+false+, right if it evaluates to \matlab+true+. Third optional input specifies fill value. (iii) With one input of type \matlab+double+: \matlab+mod(..., 2)+
if ~isa(in{1}, 'double')
out{1} = double(in{1});
else
Expand Down
Binary file modified help.mat
Binary file not shown.
220 changes: 220 additions & 0 deletions spec/MATL_spec.aux
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
\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}{5}{subsection.4.1}}
\newlabel{parte: numbers}{{4.1}{5}{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}{7}{Numerical arrays}{table.caption.2}{}}
\newlabel{RF1}{8}
\@writefile{lot}{\contentsline {table}{\numberline {2}{\ignorespaces Characters that have special meaning within number literals or array literals\relax }}{8}{table.caption.2}}
\newlabel{tab: characters in arrays}{{2}{8}{Characters that have special meaning within number literals or array literals\relax }{table.caption.2}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.3}Logical arrays}{9}{subsection.4.3}}
\newlabel{parte: logical arrays}{{4.3}{9}{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}{10}{section.5}}
\newlabel{parte: functions}{{5}{10}{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}}
\newlabel{parte: automatic clipboards}{{5.4.2}{17}{Automatic clipboards}{subsubsection.5.4.2}{}}
\@writefile{lot}{\contentsline {table}{\numberline {3}{\ignorespaces Initial content of clipboards\relax }}{18}{table.caption.3}}
\newlabel{tab: clipboard initial contents}{{3}{18}{Initial content of clipboards\relax }{table.caption.3}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5}Indices and indexing functions}{21}{subsection.5.5}}
\newlabel{parte: indexing}{{5.5}{21}{Indices and indexing functions}{subsection.5.5}{}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.5.1}Basic indexing functions}{24}{subsubsection.5.5.1}}
\newlabel{parte: basic indexing functions}{{5.5.1}{24}{Basic indexing functions}{subsubsection.5.5.1}{}}
\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.5.2}Colon indexing functions}{27}{subsubsection.5.5.2}}
\@writefile{toc}{\contentsline {section}{\numberline {6}Control flow: conditional branches and loops}{28}{section.6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.1}Conditional branches: ``if\ldots {}else''}{28}{subsection.6.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {6.2}Loops: ``for'', ``do twice'', ``do\ldots {}while'' and ``while''}{29}{subsection.6.2}}
\newlabel{parte: @}{{6.2}{29}{Loops: ``for'', ``do twice'', ``do\ldots {}while'' and ``while''}{subsection.6.2}{}}
\@writefile{toc}{\contentsline {section}{\numberline {7}Implicit actions}{30}{section.7}}
\newlabel{parte: implicit actions}{{7}{30}{Implicit actions}{section.7}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.1}Initial actions}{30}{subsection.7.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.2}Final actions}{30}{subsection.7.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.3}Implicit inputs}{31}{subsection.7.3}}
\newlabel{parte: implicit inputs}{{7.3}{31}{Implicit inputs}{subsection.7.3}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {7.4}Automatic file input and output}{32}{subsection.7.4}}
\@writefile{toc}{\contentsline {section}{\numberline {8}Table of functions}{32}{section.8}}
\newlabel{parte: table of functions}{{8}{32}{Table of functions}{section.8}{}}
\@writefile{lot}{\contentsline {table}{\numberline {4}{\ignorespaces Table of MATL statements\relax }}{34}{table.caption.4}}
\newlabel{tab: function table}{{4}{34}{Table of MATL statements\relax }{table.caption.4}{}}
\@writefile{lot}{\contentsline {table}{\numberline {5}{\ignorespaces Behaviour of functions regarding consumption of inputs, consumption of input/output specifications and overwriting of function-input clipboard\relax }}{35}{table.caption.5}}
\newlabel{tab: function consumption}{{5}{35}{Behaviour of functions regarding consumption of inputs, consumption of input/output specifications and overwriting of function-input clipboard\relax }{table.caption.5}{}}
\@writefile{toc}{\contentsline {section}{\numberline {9}The MATL compiler}{35}{section.9}}
\@writefile{toc}{\contentsline {subsection}{\numberline {9.1}Usage}{35}{subsection.9.1}}
\newlabel{case: 2nd input: code}{{1}{37}{Usage}{Item.9}{}}
\newlabel{case: 2nd input: file}{{2}{37}{Usage}{Item.10}{}}
\newlabel{case: 2nd input: help}{{3}{38}{Usage}{Item.11}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Example of parsed code with automatic comments\relax }}{39}{figure.caption.6}}
\newlabel{fig: code with automatic comments}{{1}{39}{Example of parsed code with automatic comments\relax }{figure.caption.6}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Example of command-line help\relax }}{39}{figure.caption.7}}
\newlabel{fig: help}{{2}{39}{Example of command-line help\relax }{figure.caption.7}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {9.2}Structure}{39}{subsection.9.2}}
\newlabel{parte: compiler structure}{{9.2}{39}{Structure}{subsection.9.2}{}}
\@writefile{toc}{\contentsline {section}{\numberline {10}Compatibility with Octave}{41}{section.10}}
\newlabel{parte: compatibility with Octave}{{10}{41}{Compatibility with Octave}{section.10}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {10.1}Compiler}{41}{subsection.10.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {10.2}MATL functions}{42}{subsection.10.2}}
\@writefile{toc}{\contentsline {section}{\numberline {11}Running MATL online}{48}{section.11}}
\newlabel{parte: online}{{11}{48}{Running MATL online}{section.11}{}}
\@writefile{toc}{\contentsline {section}{\numberline {12}Example programs explained}{48}{section.12}}
\newlabel{parte: example programs explained}{{12}{48}{Example programs explained}{section.12}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {12.1}Example 1: infinite loop}{48}{subsection.12.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {12.2}Example 2: first 10 Fibonacci numbers}{48}{subsection.12.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {12.3}Example 3: unique characters from string in original order}{49}{subsection.12.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {12.4}Example 4: unique characters from string in original order, manual approach}{49}{subsection.12.4}}
\@writefile{toc}{\contentsline {section}{\numberline {13}Acknowledgments}{50}{section.13}}
\@writefile{toc}{\contentsline {section}{Appendix \numberline {A}Detailed function definitions}{52}{Appendix.a.A}}
\newlabel{parte: list of functions}{{A}{52}{Detailed function definitions}{Appendix.a.A}{}}
\@writefile{lot}{\contentsline {table}{\numberline {6}{\ignorespaces Function definitions\relax }}{52}{table.6}}
\newlabel{tab: funDef}{{6}{52}{Detailed function definitions}{table.6}{}}
\gdef \LT@i {\LT@entry
{1}{23.31676pt}\LT@entry
{6}{58.27696pt}\LT@entry
{4}{68.87401pt}\LT@entry
{1}{273.29929pt}}
\gdef \LT@ii {\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{125.09738pt}}
\gdef \LT@iii {\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{125.09738pt}}
\gdef \LT@iv {\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{125.09738pt}}
\gdef \LT@v {\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{125.09738pt}}
\gdef \LT@vi {\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{125.09738pt}}
\gdef \LT@vii {\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{125.09738pt}}
\gdef \LT@viii {\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{125.09738pt}}
\gdef \LT@ix {\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{125.09738pt}}
\gdef \LT@x {\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{125.09738pt}}
\gdef \LT@xi {\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{125.09738pt}}
\gdef \LT@xii {\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{125.09738pt}}
\gdef \LT@xiii {\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{125.09738pt}}
\gdef \LT@xiv {\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{125.09738pt}}
\gdef \LT@xv {\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{125.09738pt}}
\gdef \LT@xvi {\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{127.09738pt}\LT@entry
{1}{23.69952pt}\LT@entry
{1}{125.09738pt}}
\@writefile{lot}{\contentsline {table}{\numberline {7}{\ignorespaces Output of predefined literal functions\relax }}{73}{table.caption.8}}
\newlabel{tab: preLit}{{7}{73}{Output of predefined literal functions\relax }{table.caption.8}{}}
45 changes: 45 additions & 0 deletions spec/MATL_spec.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
\BOOKMARK [1][-]{section.1}{Introduction}{}% 1
\BOOKMARK [2][-]{subsection.1.1}{The name}{section.1}% 2
\BOOKMARK [2][-]{subsection.1.2}{Notation}{section.1}% 3
\BOOKMARK [2][-]{subsection.1.3}{Examples}{section.1}% 4
\BOOKMARK [1][-]{section.2}{The stack. Data types}{}% 5
\BOOKMARK [1][-]{section.3}{Statements and separators}{}% 6
\BOOKMARK [1][-]{section.4}{Literals}{}% 7
\BOOKMARK [2][-]{subsection.4.1}{Numbers}{section.4}% 8
\BOOKMARK [2][-]{subsection.4.2}{Numerical arrays}{section.4}% 9
\BOOKMARK [2][-]{subsection.4.3}{Logical arrays}{section.4}% 10
\BOOKMARK [2][-]{subsection.4.4}{Character arrays}{section.4}% 11
\BOOKMARK [2][-]{subsection.4.5}{Cell arrays}{section.4}% 12
\BOOKMARK [1][-]{section.5}{Functions}{}% 13
\BOOKMARK [2][-]{subsection.5.1}{Normal functions}{section.5}% 14
\BOOKMARK [2][-]{subsection.5.2}{Meta-functions}{section.5}% 15
\BOOKMARK [2][-]{subsection.5.3}{Stack rearranging functions}{section.5}% 16
\BOOKMARK [2][-]{subsection.5.4}{Clipboard functions}{section.5}% 17
\BOOKMARK [3][-]{subsubsection.5.4.1}{Standard clipboards}{subsection.5.4}% 18
\BOOKMARK [3][-]{subsubsection.5.4.2}{Automatic clipboards}{subsection.5.4}% 19
\BOOKMARK [2][-]{subsection.5.5}{Indices and indexing functions}{section.5}% 20
\BOOKMARK [3][-]{subsubsection.5.5.1}{Basic indexing functions}{subsection.5.5}% 21
\BOOKMARK [3][-]{subsubsection.5.5.2}{Colon indexing functions}{subsection.5.5}% 22
\BOOKMARK [1][-]{section.6}{Control flow: conditional branches and loops}{}% 23
\BOOKMARK [2][-]{subsection.6.1}{Conditional branches: ``if\203else''}{section.6}% 24
\BOOKMARK [2][-]{subsection.6.2}{Loops: ``for'', ``do twice'', ``do\203while'' and ``while''}{section.6}% 25
\BOOKMARK [1][-]{section.7}{Implicit actions}{}% 26
\BOOKMARK [2][-]{subsection.7.1}{Initial actions}{section.7}% 27
\BOOKMARK [2][-]{subsection.7.2}{Final actions}{section.7}% 28
\BOOKMARK [2][-]{subsection.7.3}{Implicit inputs}{section.7}% 29
\BOOKMARK [2][-]{subsection.7.4}{Automatic file input and output}{section.7}% 30
\BOOKMARK [1][-]{section.8}{Table of functions}{}% 31
\BOOKMARK [1][-]{section.9}{The MATL compiler}{}% 32
\BOOKMARK [2][-]{subsection.9.1}{Usage}{section.9}% 33
\BOOKMARK [2][-]{subsection.9.2}{Structure}{section.9}% 34
\BOOKMARK [1][-]{section.10}{Compatibility with Octave}{}% 35
\BOOKMARK [2][-]{subsection.10.1}{Compiler}{section.10}% 36
\BOOKMARK [2][-]{subsection.10.2}{MATL functions}{section.10}% 37
\BOOKMARK [1][-]{section.11}{Running MATL online}{}% 38
\BOOKMARK [1][-]{section.12}{Example programs explained}{}% 39
\BOOKMARK [2][-]{subsection.12.1}{Example 1: infinite loop}{section.12}% 40
\BOOKMARK [2][-]{subsection.12.2}{Example 2: first 10 Fibonacci numbers}{section.12}% 41
\BOOKMARK [2][-]{subsection.12.3}{Example 3: unique characters from string in original order}{section.12}% 42
\BOOKMARK [2][-]{subsection.12.4}{Example 4: unique characters from string in original order, manual approach}{section.12}% 43
\BOOKMARK [1][-]{section.13}{Acknowledgments}{}% 44
\BOOKMARK [1][-]{Appendix.a.A}{Appendix Detailed function definitions}{}% 45
Binary file modified spec/MATL_spec.pdf
Binary file not shown.
Loading

0 comments on commit 053509b

Please sign in to comment.