From: adam a. <ada...@ho...> - 2012-09-25 15:07:45
|
All sounds good to me. Makes sense to keep to the standard way of doing things to make it behave as others might expect. I'm not all that familiar with the standard (yet), so if you see any ways to standardise it that is great. About the input checks - I'd aimed to make it behave as Matlab does for all acceptable inputs. But for the cases where Matlab throws an error, this function generally asks the user what to do instead. But I'm happy for this to be simplified or left for other functions which call these. > From: car...@gm... > Date: Tue, 25 Sep 2012 16:30:48 +0200 > Subject: Re: [OctDev] Analyze75 > To: ada...@ho... > CC: oct...@li... > > I've been changing a bit the input check. The standard we have is to > check the value of nargin. Doing this at the start means that you > don't have to check if the variable exists later. > > Another thing I noticed is the many ways it tries to handle invalid > filenames. While it looks kinda slick, I'm not sure it's a good idea > to have the function doing it, it should be done by the script that > calls it. When you give wrong arguments to a function, trying to guess > what is right can lead to weird results. Or does matlab also behaves > that way (it's not documented at least). My suggestion would be to > maybe display the file selection if no argument is given but return an > error if the filenames are not valid files. What do you think? > > Carnë |