[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: things for 3.0
From: |
David Bateman |
Subject: |
Re: things for 3.0 |
Date: |
Thu, 18 Oct 2007 22:11:45 +0200 |
User-agent: |
Thunderbird 1.5.0.7 (X11/20060921) |
John W. Eaton wrote:
> * Update the refcard.
>
What are you looking for exactly for this? The attached patch is an
incomplete attempt at addressing this. What else needs documenting.. We
have to limit it to 8 columns to allow the "Legal" format to fit on two
pages, and thats not much space to document all of Octave..
D.
*** ./doc/refcard/refcard.tex.orig7 2007-10-13 06:52:02.000000000 +0200
--- ./doc/refcard/refcard.tex 2007-10-18 22:04:42.206569152 +0200
***************
*** 50,57 ****
% I chose to omit. In general, not all synonyms for commands are
% covered, nor all variations of a command.
! \def\octaveversion{1.1.1}
! \def\refcardedition{1.1}
% ------------------
% multicolumn format
--- 50,57 ----
% I chose to omit. In general, not all synonyms for commands are
% covered, nor all variations of a command.
! \def\octaveversion{3.0.0}
! \def\refcardedition{2.0}
% ------------------
% multicolumn format
***************
*** 378,383 ****
--- 378,384 ----
\sec Starting Octave;
octave&start interactive Octave session\cr
octave {\it file}&run Octave on commands in {\it file}\cr
+ octave --eval {\it code}&Evaluate {\it code} using Octave\cr
octave --help&describe command line options\cr
\endsec
***************
*** 390,397 ****
\sec Getting Help;
help&list all commands and built-in variables\cr
help {\it command}&briefly describe {\it command}\cr
! help -i&use Info to browse Octave manual\cr
! help -i {\it command}&search for {\it command\/} in Octave manual\cr
\endsec
\sec Motion in Info;
--- 391,398 ----
\sec Getting Help;
help&list all commands and built-in variables\cr
help {\it command}&briefly describe {\it command}\cr
! doc&use Info to browse Octave manual\cr
! doc {\it command}&search for {\it command\/} in Octave manual\cr
\endsec
\sec Motion in Info;
***************
*** 448,454 ****
\line{\smrm \opt{ } surround optional arguments
\hfill ... show one or more arguments}
\vskip0.25\baselineskip
- \centerline{\smrm Copyright 1996, 1997 John W. Eaton\qquad Permissions on
back}
\eject
\sec Killing and Yanking;
--- 449,454 ----
***************
*** 512,517 ****
--- 512,534 ----
[ {\it w}, {\it x}; {\it y}, {\it z} ]&enter a 2$\times$2 matrix\cr
\endsec
+ \sec Multi-dimensional Arrays;
+ \omit\vbox{\rm\vskip0.25ex
+ Multi-dimensional arrays may be created with the {\it cat} or
+ {\it reshape} commands from two-dimensional sub-matrices.
+ \vskip0.75ex}\span\cr
+ squeeze ({\it arr})&remove singleton dimensions of the array.\cr
+ permute ({\it arr}, {\it perm})&permute the dimensions of an array.\cr
+ \endsec
+
+ \vfill\eject
+
+ \sec ;
+ ipermute ({\it arr}, {\it perm})&inverse permutation of an array.\cr
+ shifdim ({\it arr}, {\it shft})&rotate the dimensions of an array.\cr
+ circshift ({\it arr}, {\it shft})&rotate the elements of an array.\cr
+ \endsec
+
\sec Ranges;
{\it base} : {\it limit}\cr
{\it base} : {\it incr} : {\it limit}\cr
***************
*** 521,532 ****
{\it incr\/} is 1. Negative increments are permitted.}\span\cr
\endsec
- \vfill\eject
-
\sec Strings and Common Escape Sequences;
\omit\vbox{\rm\vskip0.5ex
A {\it string constant\/} consists of a sequence of characters
! enclosed in either double-quote or single-quote marks.\vskip0.75ex}\span\cr
\char'134\char'134&a literal backslash\cr
\char'134 "&a literal double-quote character\cr
\char'134 '&a literal single-quote character\cr
--- 538,549 ----
{\it incr\/} is 1. Negative increments are permitted.}\span\cr
\endsec
\sec Strings and Common Escape Sequences;
\omit\vbox{\rm\vskip0.5ex
A {\it string constant\/} consists of a sequence of characters
! enclosed in either double-quote or single-quote marks. Strings
! in double-quotes allow the use of the escape sequences below.
! \vskip0.75ex}\span\cr
\char'134\char'134&a literal backslash\cr
\char'134 "&a literal double-quote character\cr
\char'134 '&a literal single-quote character\cr
***************
*** 546,571 ****
\quad :&select all rows (columns)\cr
\endsec
! \sec Global Variables;
global {\it var1} ...&Declare variables global.\cr
\omit\hfill\vbox{\hsize=\idnwid\rm\vskip0.25ex
Global variables may be accessed inside the body of a function
without having to be passed in the function parameter list provided
they are also declared global within the function.}\span\cr
\endsec
\sec Selected Built-in Functions;
EDITOR&editor to use with {\tt edit\_history}\cr
Inf, NaN&IEEE infinity, NaN\cr
PAGER&program to use to paginate output\cr
ans&last result not explicitly assigned\cr
eps&machine precision\cr
pi&$\pi$\cr
realmax&maximum representable value\cr
realmin&minimum representable value\cr
\endsec
! \vfill\eject
\sec Arithmetic and Increment Operators;
{\it x} + {\it y}&addition\cr
--- 563,604 ----
\quad :&select all rows (columns)\cr
\endsec
! \sec Global and Persistent Variables;
global {\it var1} ...&Declare variables global.\cr
+ global {\it var1} = {\it val}&Declare variables global and set its
+ intial value.\cr
\omit\hfill\vbox{\hsize=\idnwid\rm\vskip0.25ex
Global variables may be accessed inside the body of a function
without having to be passed in the function parameter list provided
they are also declared global within the function.}\span\cr
+ persistent {\it var1} ...&Declare a variable as static to a function.\cr
+ persistent {\it var1} = {\it val}&Declare a variable as static to a
+ function and set its initial value.\cr
\endsec
\sec Selected Built-in Functions;
EDITOR&editor to use with {\tt edit\_history}\cr
Inf, NaN&IEEE infinity, NaN\cr
+ NA&Missing value\cr
PAGER&program to use to paginate output\cr
ans&last result not explicitly assigned\cr
eps&machine precision\cr
pi&$\pi$\cr
+ 1i&$\sqrt{-1}$\cr
realmax&maximum representable value\cr
realmin&minimum representable value\cr
\endsec
! \vfill
! \centerline{\smrm Copyright 1996, 1997, 2007 John W. Eaton\qquad Permissions
on back}
! \eject
!
! \sec Assignment Expressions;
! {\it var} = {\it expr}&assign expression to variable\cr
! {\it var} ({\it idx}) = {\it expr}&assign expression to indexed variable\cr
! {\it var} ({\it idx}) = []&delete the indexed elements.\cr
! {\it var} $\{${\it idx}$\}$ = {\it expr}&assign elements of a cell array.\cr
! \endsec
\sec Arithmetic and Increment Operators;
{\it x} + {\it y}&addition\cr
***************
*** 590,600 ****
return {\it old\/} value\cr
\endsec
- \sec Assignment Expressions;
- {\it var} = {\it expr}&assign expression to variable\cr
- {\it var} ({\it idx}) = {\it expr}&assign expression to indexed variable\cr
- \endsec
-
\sec Comparison and Boolean Operators;
\omit \vbox{\rm\vskip0.75ex
These operators work on an element-by-element basis. Both arguments
--- 623,628 ----
***************
*** 612,628 ****
\sec Short-circuit Boolean Operators;
\omit \vbox{\rm\vskip0.75ex
! Operators evaluate left-to-right, expecting scalar operands.
! Operands are only evaluated if necessary, stopping once overall
! truth value can be determined. Operands are converted to scalars by
! applying the {\tt all} function.\vskip0.75ex}\span\cr
{\it x} \&\& {\it y}&true if both {\it x\/} and {\it y\/} are true\cr
{\it x} || {\it y}&true if at least one of {\it x\/} or {\it y\/} is true\cr
\endsec
\sec Operator Precedence;
\omit \vbox{\rm\vskip0.5ex
! Here is a table of the operators in Octave, in order of increasing
precedence.\vskip0.75ex}\span\cr
;\ \ ,&statement separators\cr
=&assignment, groups left to right\cr
--- 640,656 ----
\sec Short-circuit Boolean Operators;
\omit \vbox{\rm\vskip0.75ex
! Operators evaluate left-to-right. Operands are only evaluated if
! necessary, stopping once overall truth value can be determined.
! Operands are converted to scalars using the {\tt all}
! function.\vskip0.75ex}\span\cr
{\it x} \&\& {\it y}&true if both {\it x\/} and {\it y\/} are true\cr
{\it x} || {\it y}&true if at least one of {\it x\/} or {\it y\/} is true\cr
\endsec
\sec Operator Precedence;
\omit \vbox{\rm\vskip0.5ex
! Table of operators in Octave, in order of increasing
precedence.\vskip0.75ex}\span\cr
;\ \ ,&statement separators\cr
=&assignment, groups left to right\cr
***************
*** 671,676 ****
--- 699,708 ----
\hfill\vbox{\hsize=\idnwid\rm\vskip0.25ex
Execute {\it body}. Execute {\it cleanup} no matter how control
exits {\it body}.}\cr
+ try {\it body} catch {\it cleanup} end\cr
+ \hfill\vbox{\hsize=\idnwid\rm\vskip0.25ex
+ Execute {\it body}. If the execution of {\it body} fails execute
+ {\it cleanup}.}\cr
\endsec
\widesec Defining Functions;
***************
*** 684,694 ****
--- 716,746 ----
be empty.}\cr
\endsec
+ \sec Function Handles;
+ @{\it{func}}& Define a function handle to the function {\it func}.\cr
+ @({\it var1}, ...) {\it expr}&Define an anonymous function handle.\cr
+ str2func ({\it str})&Create a function handle from a string.\cr
+ functions ({\it handle})&Return information about a function handle.\cr
+ func2str ({\it handle})&Return a string representation of a
+ function handle.\cr
+ {\it handle} ({\it arg1}, ...)&Evaluate a function handle.\cr
+ feval ({\it func}, {\it arg1}, ...)&Evaluate a function handle or
+ string, passing remaining args to called function\cr
+ \omit\vbox{\rm\vskip0.25ex
+ Anonymous function handles take a copy of the variables in the
+ current workspace.\vskip0.75ex}\span\cr
+ \endsec
+
\sec Basic Matrix Manipulations;
rows ({\it a})&return number of rows of {\it a}\cr
columns ({\it a})&return number of columns of {\it a}\cr
all ({\it a})&check if all elements of {\it a\/} nonzero\cr
any ({\it a})&check if any elements of {\it a\/} nonzero\cr
+ \endsec
+
+ \vfill\eject
+
+ \sec ;
find ({\it a})&return indices of nonzero elements\cr
sort ({\it a})&order elements in each column of {\it a}\cr
sum ({\it a})&sum elements in columns of {\it a}\cr
***************
*** 710,717 ****
values\cr
\endsec
- \vfill\eject
-
% sin({\it a}) cos({\it a}) tan({\it a})&trigonometric functions\cr
% asin({\it a}) acos({\it a}) atan({\it a})&inverse trigonometric functions\cr
% sinh({\it a}) cosh({\it a}) tanh({\it a})&hyperbolic trig functions\cr
--- 762,767 ----
***************
*** 747,752 ****
--- 797,814 ----
arguments for these functions.}\span\cr
\endsec
+ \altsec Sets;
+ create\_set ({\it a}, {\it b})&create row vector of unique values\cr
+ complement ({\it a}, {\it b})&elements of {\it b} not in {\it a}\cr
+ intersection ({\it a}, {\it b})&intersection of sets {\it a} and {\it b}\cr
+ union ({\it a}, {\it b})&union of sets {\it a} and {\it b}\cr
+ \endsec
+
+ \altsec Strings;
+ strcmp ({\it s}, {\it t})&compare strings\cr
+ strcat ({\it s}, {\it t}, ...)&concatenate strings\cr
+ \endsec
+
\sec Signal Processing;
fft ({\it a})&Fast Fourier Transform using FFTPACK\cr
ifft ({\it a})&inverse FFT using FFTPACK\cr
***************
*** 754,759 ****
--- 816,823 ----
sinc ({\it x})&returns {\tt sin ($\pi$ x)/($\pi$ x)}\cr
\endsec
+ \vfill\eject
+
\altsec Image Processing;
colormap ({\it map})&set the current colormap\cr
gray2ind ({\it i}, {\it n})&convert gray scale to Octave image\cr
***************
*** 770,789 ****
save a matrix to {\it file}\span\cr
\endsec
- \altsec Sets;
- create\_set ({\it a}, {\it b})&create row vector of unique values\cr
- complement ({\it a}, {\it b})&elements of {\it b} not in {\it a}\cr
- intersection ({\it a}, {\it b})&intersection of sets {\it a} and {\it b}\cr
- union ({\it a}, {\it b})&union of sets {\it a} and {\it b}\cr
- \endsec
-
- \altsec Strings;
- strcmp ({\it s}, {\it t})&compare strings\cr
- strcat ({\it s}, {\it t}, ...)&concatenate strings\cr
- \endsec
-
- \vfill\eject
-
\altsec C-style Input and Output;
fopen ({\it name}, {\it mode})&open file {\it name}\cr
fclose ({\it file})&close {\it file}\cr
--- 834,839 ----
***************
*** 815,822 ****
\sec Miscellaneous Functions;
eval ({\it str})&evaluate {\it str} as a command\cr
- feval ({\it str}, ...)&evaluate function named by {\it str},
- passing remaining args to called function\cr\cr
error ({\it message})&print message and return to top level\cr\cr
clear {\it pattern}&clear variables matching pattern\cr
exist ({\it str})&check existence of variable or function\cr
--- 865,870 ----
***************
*** 837,842 ****
--- 885,892 ----
ratio {\it a}/{\it b}\cr
\endsec
+ \vfill\eject
+
\sec Statistics;
corrcoef ({\it x}, {\it y})&correlation coefficient\cr
cov ({\it x}, {\it y})&covariance\cr
***************
*** 846,853 ****
var ({\it a})&variance\cr
\endsec
- \vfill\eject
-
\sec Plotting Functions;
plot ({\it args})&2D plot with linear axes\cr
plot3 ({\it args})&3D plot with linear axes\cr
--- 896,901 ----
- Re: things for 3.0, (continued)
- Re: things for 3.0, Shai Ayal, 2007/10/12
- Re: things for 3.0, David Bateman, 2007/10/12
- Re: things for 3.0, Shai Ayal, 2007/10/12
- Re: things for 3.0, David Bateman, 2007/10/12
- Re: things for 3.0, David Bateman, 2007/10/12
- Re: things for 3.0, David Bateman, 2007/10/12
- Re: things for 3.0, John W. Eaton, 2007/10/12
- Re: things for 3.0, David Bateman, 2007/10/13
- Re: things for 3.0, John W. Eaton, 2007/10/13
Re: things for 3.0, Peter A. Gustafson, 2007/10/12
Re: things for 3.0,
David Bateman <=
things for 3.0, John W. Eaton, 2007/10/19