From bug-octave-request at bevo dot che dot wisc dot edu Tue Feb 22 23:22:38 2000 Subject: online doc suggestions From: "Joseph P. Skudlarek" To: bug-octave at bevo dot che dot wisc dot edu Date: Tue, 22 Feb 2000 23:23:07 -0600 (CST) Hi. I really like Octave -- it's a power affordable high featured MATLAB clone -- thanks! for making it available. It's so important, that let me say that again -- thanks for making such a wonderful system available! I've been looking for some optimization code, and can port things pretty easily to Octave from MATLAB. I also took a small example I had in Mathematica (non-linear numerical optimization), and got it going in Octave, complete with plotting -- nice stuff! I recently read through the entire online *info* for Octave, and have the following observations. They are in "here's the context" followed by the "should be" (s/b) suggestion. I hope this is useful. It corresponds to *info* 2.0.13 which came with 2.0.14. ----------------------------------------------------------------------- When Octave encounters an identifier that is undefined, it first looks for variables or functions that are already compiled and currently listed in its symbol table. If it fails to find a definition there, it s/b encounters an identifier it needs to classify ----------------------------------------------------------------------- commands. You should use this function should when you want to s/b commands. You should use this function when you want to ----------------------------------------------------------------------- - Built-in Function: fflush (FID) Flush output to FID. This is useful for ensuring that all pending output makes it to the screen before some other event occurs. For example, it is always a good idea to flush the standard output stream before calling `input'. s/b - Built-in Function: fflush (FID) Flush output to FID. This is useful for ensuring that all pending output makes it to the screen before some other event occurs. For example, it is always a good idea to flush the standard output stream before calling `input'. ----------------------------------------------------------------------- - Mapping Function: finite (X) Return 1 for elements of X that are NaN values and zero otherwise. For example, finite ([13, Inf, NaN]) => [ 1, 0, 0 ] s/b - Mapping Function: finite (X) Return 1 for elements of X that are finite values and zero otherwise. For example, finite ([13, Inf, NaN]) => [ 1, 0, 0 ] ----------------------------------------------------------------------- - Function File: duplication_matrix (N) Return the duplication matrix D_N which is the unique N^2 by N*(N+1)/2 matrix such that D_N \cdot vech (A) = vec (A) for all symmetric N by N matrices A. what is \cdot? ----------------------------------------------------------------------- - Function File: rank (A, TOL) Compute the rank of A, using the singular value decomposition. The rank is taken to be the number of singular values of A that are greater than the specified tolerance TOL. If the second argument is omitted, it is taken to be tol = max (size (A)) * sigma (1) * eps; where `eps' is machine precision and `sigma' is the largest singular value of A. s/b tol = max (size (A)) * sigma (A) * eps; ----------------------------------------------------------------------- The permuted QR factorization `[Q, R, P] = qr (A)' forms the QR factorization such that the diagonal entries of `r' are decreasing in magnitude order. For example, given the matrix `a = [1, 2; 3, 4]', [q, r, pi] = qr(a) returns s/b [q, r, p] = qr(a) ----------------------------------------------------------------------- - Loadable Function: S = schur (A) - Loadable Function: [U, S] = schur (A, OPT) The Schur decomposition is used to compute eigenvalues of a square matrix, and has applications in the solution of algebraic Riccati equations in control (see `are' and `dare'). `schur' always returns `s = u' * a * u' where `u' is a unitary matrix (`u'* u' is identity) and `s' is upper triangular. The eigenvalues of `a' (and `s') are the diagonal elements of `s' If the matrix `a' is real, then the real Schur decomposition is computed, in which the matrix `u' is orthogonal and `s' is block upper triangular with blocks of size at most `2 x 2' blocks along the diagonal. The diagonal elements of `s' (or the eigenvalues of the `2 x 2' blocks, when appropriate) are the eigenvalues of `a' and `s'. s/b blocks of size at most `2 x 2' along the diagonal. The ----------------------------------------------------------------------- - Function File: mesh (X, Y, Z) Plot a mesh given matrices `x', and Y from `meshdom' and a matrix Z corresponding to the X and Y coordinates of the mesh. s/b - Function File: mesh (X, Y, Z) Plot a mesh given matrices X and Y from `meshdom' and a matrix Z corresponding to the X and Y coordinates of the mesh. ----------------------------------------------------------------------- - Function File: meshdom (X, Y) Given vectors of X and Y coordinates, return two matrices corresponding to the X and Y coordinates of the mesh. See the file `sombrero.m' for an example of using `mesh' and `meshdom'. s/b - Function File: [xx, yy] = meshdom (X, Y) Given vectors of X and Y coordinates, return two matrices corresponding to the X and Y coordinates of the mesh. See the file `sombrero.m' for an example of using `mesh' and `meshdom'. [[actually, sombrero.m uses meshgrid, so that should be updated too.]] ----------------------------------------------------------------------- - Mapping Function: finite (X) Return 1 for elements of X that are NaN values and zero otherwise. For example, finite ([13, Inf, NaN]) => [ 1, 0, 0 ] s/b 1 iff finite (not Inf, not NaN), else 0 ----------------------------------------------------------------------- In this case, the value of the evaluated expression is printed and it is also returned returned from `eval'. s/b In this case, the value of the evaluated expression is printed and it is also returned from `eval'. ----------------------------------------------------------------------- The symbol RET-VAR is the name of the variable that will hold the value to be returned by the function. This variable must be defined before the end of the function body in order for the function to return a value. Q/ "defined", or "assigned"? -- turns out that assignment ends up defining the variable. ----------------------------------------------------------------------- when trying to plot many lines on one graph, you have probably generated a plot command that is too larger for `gnuplot''s fixed-length buffer for commands. Splitting up the plot command s/b generated a plot command that is too large for `gnuplot''s ----------------------------------------------------------------------- ------------------------------------------------------------------------ Joseph P. SKUDLAREK Jskud at cypress dot com direct 503/526-1874 Programmable Logic Division 8196 Hall Blvd #100 FAX 503/626-6688 Cypress Semiconductor Corp Beaverton Oregon 97008 www.cypress.com ------------------------------------------------------------------------ [] ----------------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.che.wisc.edu/octave/octave.html How to fund new projects: http://www.che.wisc.edu/octave/funding.html Subscription information: http://www.che.wisc.edu/octave/archive.html -----------------------------------------------------------------------