From help-octave-request at bevo dot che dot wisc dot edu Fri Dec 5 16:47:02 2003 Subject: Hiding subroutines? From: Vic Norton To: help-octave at bevo dot che dot wisc dot edu Date: Fri, 5 Dec 2003 17:46:11 -0500 Is there a way to hide functions that are utilities for a main routine? For example, I am writing a Simplex Method, Phase 2 function, simp2, that uses a bunch of utility subroutines. When I compile things and ask "who" I see *** currently compiled functions: ea2b icmp ivect2set ltsolve simp2 utsolve fu iset2vect ix2e replidx simp2step I would like to just see "simp2". The other stuff is supporting this. Is there some way to accomplish this? Second question. Some of these "utilities" are undoubtedly internal to octave. I wonder if the internal routines can be accessed directly. For example "utsolve" and "ltsolve" just solve upper and lower triangular systems respectively: ## utsolve x = b; for i = m : -1 : 1 if (U(i,i) == 0) error("diagonal element is zero in utsolve\n"); endif x(i,:) = (b(i,:) - U(i,i+1:m) * x(i+1:m,:))/U(i,i); endfor and ## ltsolve x = b; for i = 1 : m if (L(i,i) == 0) error("diagonal element is zero in ltsolve\n"); endif x(i,:) = (b(i,:) - L(i,1:i-1) * x(1:i-1,:))/L(i,i); endfor Regards, Vic -- *---* mailto:vic at norton dot name | Victor Thane Norton, Jr. | Mathematician and Motorcyclist | phone: 419-353-3399 *---* http://vic.norton.name ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------