The code doesn't work for me. In fact, there are two cases where fwhm is set to 0. With the previou code, I had the right fwhm. That's why I don't like a very complex code, because it has strange behavious for ome cases.
My function wa very simple, did only one thing, but did it well. My program is too complicated and in fact I must keep secret what it contains but the fact is the function you have coded don't reach to find as many fwhm as the previous code. Your wish is good, but I don't thing it's important to include as many features as this curent version. I think matricial input are not needed. I really think that the most important is to provide a simple function that return the fwhm of a function and that's all. No need to return the fwhm in 5 dimensional space with relativity corrections :) By the way, do as you wish, the code is public domain, but I will keep my simple version for my own use :) Now, your version is too complicated for me to help you find the bug. I tried to find why it return 0 in place of the right fwhm. Hope you'll find the bug. good luck Le lundi 13 juillet 2009 à 16:37 +0200, Petr Mikulik a écrit : > > The function will not work if there is many impulsion (maximum) in the > > vector imput. > > > > To be honest, I didn't know that cosinus had a fwhm. I just code that > > function for my own use and share it. I will not improve this to work on > > every mathematical function it already exist. > > Well, it is necessary to test a (contributed) code into all possible inputs > users can supply. I've noticed that your code does neither work for > continuous and monotonous functions. > > The enclosed script fwhm.m is rewritten from scratch (I was also using > such a function earlier). > - It works on both vectorial and matricial input. > - It returns -1 if FWHM does not exist. > - It was tested against various inputs. > - It works on both Octave and Matlab. > - It includes test case for Octave. > > Please test it and commit to Octave if it is found OK (with whatever > comments in the file header). > > --- > Petr Mikulik
<<attachment: face-smile.png>>
------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge
_______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev