From help-octave-request at bevo dot che dot wisc dot edu Wed Jan 21 16:05:31 2004 Subject: Re: matlab nargin() function alternative in octave? From: Sharene Deanne Bungay To: taltman at lbl dot gov Cc: help-octave at bevo dot che dot wisc dot edu Date: Wed, 21 Jan 2004 17:02:51 -0500 Hi Tomer, On Wed, 2004-01-21 at 15:30, taltman at lbl dot gov wrote: > Wait, you don't have control over the Matlab M-files? Are they > read-only? You can always copy them... Just too many to bother with if an alternative solution exists. > Well, I guess the user has to select the module sometime, so why not > use that in a message-passing function? Agreed. Would have probably taken this route if there wasn't a simple alternative to the nargin("string") functionality. > If this entire module is in your path, and the multiple copies (lets > say around 25) of "myfunc" are in that module, then how does your > program differentiate between them? For the most part it doesn't, just calls them blindly by the looks of it. I should make an additional point clearer now...the algorithm I am attempting to get working is also third-party, but makes use of the nargin thing. The whole thing has taken a somewhat less graceful approach to what I would have taken. > Though this is not your fault, > this sounds like extremely bad coding practice (i.e. meaningless > function names ). I agree *completely* with that! :) > > Okay, I've read your post a second time, and I think that I understand > it more. But can you clarify the following? > > 1. You're writing a module/library, which will call the Matlab > modules/libraries, and will be used by a third-party? > > 2. You're writing a script yourself which calls the Matlab > libraries/modules? > > If I've misunderstood what you've written, please correct me. 3. I'm attempting to get a third-party large body (7000 lines) of matlab code working under octave, and would prefer to make minimal changes to the overall structure of the design. With the new nargin("string") functionality, it seems to progress much further now. (A big thank you goes to JWE for that.) Thank you for your great suggestions Tomer. Cheers, Sharene > Thanks, > > ~Tomer > > > > ------------------------------------------------------------- > 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 > ------------------------------------------------------------- ------------------------------------------------------------- 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 -------------------------------------------------------------