From: Etienne G. <et...@is...> - 2002-08-22 08:21:28
|
Hello, alternatively, you could do as in the other optimization functions and allow 'pin' (or 'x') in leasqr(x,y,pin,F,{stol,niter,wt,dp,dFdp,options}) to be a list : pin = list (p1,p2,...). 'F' would be called with x, p1, p2 ... as arguments and p1 is the adjusted argument. I don't know how this fits w/ matlab's syntax. I guess a patch that doesn't break anything would be accepted. Cheers, Etienne On Wed, Aug 21, 2002 at 09:12:13AM -0600, E. Joshua Rigler wrote: # I want to recommend, and perhaps eventually submit a small change to the # leasqr.m function in octave-forge that should be completely transparent # and backward compatible. Feedback on my idea, and instructions for # submitting this change would be appreciated. # # In the eval calls to the function "F" (i.e. the function who's # parameters are being estimated), and "dFdp" (either the numerical, or # user-written analytic derivative function), I suggest that a structure # is passed that contains miscellaneous information that is neither an # input or output vector, nor one of the parameters. It will be the job # of the user-written function to use the information in that structure # appropriately. # # This, of course, will require an additional input to leasqr.m, but if # the structure is placed as the last input variable, no previously # written code should be affected. It also seems to me that this should # be compatible with Matlab, which seems to have been another goal of the # authors of leasqr.m. # # My only option now (aside from changing my local copy of leasqr.m) is to # set a global variable, or variables, that define the options I want, but # I always feel a little tainted using global variables (a consequence of # working on too much bad FORTRAN code I suppose). If someone has a # better option, please let me know. Thanks. # # -EJR -- Etienne Grossmann ------ http://www.isr.ist.utl.pt/~etienne |