comparison doc/refcard/refcard.tex @ 19630:0e1f5a750d00

maint: Periodic merge of gui-release to default.
author John W. Eaton <jwe@octave.org>
date Tue, 20 Jan 2015 10:24:46 -0500
parents 9ac2357f19bc 446c46af4b42
children 4197fc428c7d
comparison
equal deleted inserted replaced
19626:37d37297acf8 19630:0e1f5a750d00
575 575
576 \sec Global and Persistent Variables; 576 \sec Global and Persistent Variables;
577 global {\it var1} ...&Declare variables global.\cr 577 global {\it var1} ...&Declare variables global.\cr
578 global {\it var1} = {\it val}&Declare variable global. Set initial value.\cr 578 global {\it var1} = {\it val}&Declare variable global. Set initial value.\cr
579 persistent {\it var1}&Declare a variable as static to a function.\cr 579 persistent {\it var1}&Declare a variable as static to a function.\cr
580 persistent {\it var1} = {\it val}&Declare a variable as static to a 580 persistent {\it var1} = {\it val}&Declare a variable as static to a
581 function and set its initial value.\cr 581 function and set its initial value.\cr
582 \omit\hfill\vbox{\rm\vskip0.25ex 582 \omit\hfill\vbox{\rm\vskip0.25ex
583 Global variables may be accessed inside the body of a function 583 Global variables may be accessed inside the body of a function
584 without having to be passed in the function parameter list provided 584 without having to be passed in the function parameter list provided
585 they are declared global when used.}\span\cr 585 they are declared global when used.}\span\cr
641 {\it x} == {\it y}&true if {\it x\/} is equal to {\it y}\cr 641 {\it x} == {\it y}&true if {\it x\/} is equal to {\it y}\cr
642 {\it x} >= {\it y}&true if {\it x\/} is greater than or equal to {\it y}\cr 642 {\it x} >= {\it y}&true if {\it x\/} is greater than or equal to {\it y}\cr
643 {\it x} > {\it y}&true if {\it x\/} is greater than {\it y}\cr 643 {\it x} > {\it y}&true if {\it x\/} is greater than {\it y}\cr
644 {\it x} != {\it y}&true if {\it x\/} is not equal to {\it y}\cr 644 {\it x} != {\it y}&true if {\it x\/} is not equal to {\it y}\cr
645 {\it x} \& {\it y}&true if both {\it x\/} and {\it y\/} are true\cr 645 {\it x} \& {\it y}&true if both {\it x\/} and {\it y\/} are true\cr
646 {\it x} | {\it y}&true if at least one of {\it x\/} or {\it y\/} is true\cr 646 {\it x} | {\it y}&true if at least one of {\it x\/} or {\it y\/} is true\cr
647 ! {\it bool}&true if {\it bool\/} is false\cr 647 ! {\it bool}&true if {\it bool\/} is false\cr
648 \endsec 648 \endsec
649 649
650 \sec Short-circuit Boolean Operators; 650 \sec Short-circuit Boolean Operators;
651 \omit \vbox{\rm\vskip0.75ex 651 \omit \vbox{\rm\vskip0.75ex
652 Operators evaluate left-to-right. Operands are only evaluated if 652 Operators evaluate left-to-right. Operands are only evaluated if
653 necessary, stopping once overall truth value can be determined. 653 necessary, stopping once overall truth value can be determined.
654 Operands are converted to scalars using the {\tt all} 654 Operands are converted to scalars using the {\tt all}
655 function.\vskip0.75ex}\span\cr 655 function.\vskip0.75ex}\span\cr
656 {\it x} \&\& {\it y}&true if both {\it x\/} and {\it y\/} are true\cr 656 {\it x} \&\& {\it y}&true if both {\it x\/} and {\it y\/} are true\cr
657 {\it x} || {\it y}&true if at least one of {\it x\/} or {\it y\/} is true\cr 657 {\it x} || {\it y}&true if at least one of {\it x\/} or {\it y\/} is true\cr
658 \endsec 658 \endsec
659 659
660 \sec Operator Precedence; 660 \sec Operator Precedence;
798 elements\cr 798 elements\cr
799 eye ({\it n}, {\it m})&create {\it n\/} by {\it m\/} identity matrix\cr 799 eye ({\it n}, {\it m})&create {\it n\/} by {\it m\/} identity matrix\cr
800 ones ({\it n}, {\it m})&create {\it n\/} by {\it m\/} matrix of ones\cr 800 ones ({\it n}, {\it m})&create {\it n\/} by {\it m\/} matrix of ones\cr
801 zeros ({\it n}, {\it m})&create {\it n\/} by {\it m\/} matrix of zeros\cr 801 zeros ({\it n}, {\it m})&create {\it n\/} by {\it m\/} matrix of zeros\cr
802 rand ({\it n}, {\it m})&create {\it n\/} by {\it m\/} matrix of random 802 rand ({\it n}, {\it m})&create {\it n\/} by {\it m\/} matrix of random
803 values\cr 803 values\cr
804 \endsec 804 \endsec
805 805
806 % sin ({\it a}) cos({\it a}) tan({\it a})&trigonometric functions\cr 806 % sin ({\it a}) cos({\it a}) tan({\it a})&trigonometric functions\cr
807 % asin ({\it a}) acos({\it a}) atan({\it a})&inverse trigonometric functions\cr 807 % asin ({\it a}) acos({\it a}) atan({\it a})&inverse trigonometric functions\cr
808 % sinh ({\it a}) cosh({\it a}) tanh({\it a})&hyperbolic trig functions\cr 808 % sinh ({\it a}) cosh({\it a}) tanh({\it a})&hyperbolic trig functions\cr
809 % asinh ({\it a}) acosh({\it a}) atanh({\it a})&inverse hyperbolic trig 809 % asinh ({\it a}) acosh({\it a}) atanh({\it a})&inverse hyperbolic trig
810 % functions\cr\cr 810 % functions\cr\cr
811 811
812 \sec Linear Algebra; 812 \sec Linear Algebra;
813 chol ({\it a})&Cholesky factorization\cr 813 chol ({\it a})&Cholesky factorization\cr
814 det ({\it a})&compute the determinant of a matrix\cr 814 det ({\it a})&compute the determinant of a matrix\cr
815 eig ({\it a})&eigenvalues and eigenvectors\cr 815 eig ({\it a})&eigenvalues and eigenvectors\cr
977 977
978 \end 978 \end
979 979
980 % For AUCTeX: 980 % For AUCTeX:
981 % 981 %
982 % Local Variables: 982 % Local Variables:
983 % mode: tex 983 % mode: tex
984 % TeX-master: t 984 % TeX-master: t
985 % End: 985 % End: