Fri 14 Feb 2014 02:25:27 AM UTC, comment #14:
So this is now fixed in svn, closing bug report. The next statistics package release will have the cdf function.
|
Tue 28 Jan 2014 10:16:36 PM UTC, comment #13:
Thank you all for the great job you do in octave.
Pantxo
|
Tue 28 Jan 2014 10:12:45 PM UTC, comment #12:
Sorry, I overlooked this bug. I now added cdf.m to the svn repository.
Thanks,
Arno
|
Tue 28 Jan 2014 09:51:27 PM UTC, comment #11:
No. This is the right place. Maybe this just shouldn't had been marked as fixed.
I'm adding the maintainer of the statistics package.
|
Tue 28 Jan 2014 08:08:14 PM UTC, comment #10:
I see that a new version of statistics package is out.
Should I post the patch elsewhere in order to have it reviewed (and not lost in a bug marked fixed) for a future version?
|
Thu 02 Jan 2014 03:25:51 AM UTC, comment #9:
Hi Pantxo. Thanks a lot! It works.
Alex
|
Thu 26 Dec 2013 09:10:38 AM UTC, comment #8:
Hi Alex,
If you have installed octave-forge packages along with octave, you can add the attached (last version of) cdf.m to the directory containing the statistics package scripts. This directory may be found using:
If octave is unable to load the package, the last version won't work as it relies on two scripts that belong to this package. You can then use the first version I posted (put it in a directory that belongs to your octave path), which only relies on octave core functions.
In any case, testing is very welcome. Thanks
(file #30094)
|
Thu 26 Dec 2013 02:20:53 AM UTC, comment #7:
Hi Pantxo. How do I correctly apply the patch to my installation? I am using windows 7 with the octave 3.6.4 downloaded as binary (Visual studio compiled).
Thanks.
Haolin
|
Thu 19 Dec 2013 08:03:09 PM UTC, comment #6:
I applied all your suggestions. See attached patch.
(file #30046)
|
Thu 19 Dec 2013 02:15:46 AM UTC, comment #5:
This looks like a good start to me. I'd say it should go in the statistics package and handle the distributions that are in that package.
For style, why not just make all the string names lowercase to be consistent with Octave style. For example figure properties and the like are lowercase in Octave. And since you do strcmpi it will be compatible with existing Matlab code.
The allcdf array could be made persistent so it doesn't have to be initialized each time.
|
Wed 18 Dec 2013 09:52:07 PM UTC, comment #4:
Attached is a potential cdf.m. It' a wrapper around core octave cdf functions.
Missing are :
'birnbaumsaunders', 'burr', 'ev', 'gev', 'gp', 'inversegaussian', 'loglogistic', 'nakagami', 'nbin', 'ncf', 'nct', 'ncx2', 'rayl', 'rician', 'tlocationscale', 'unid'
Those with a "*" are present in octave-forge. If cdf.m belongs to statistics package I can add those two and prepare a patch against svn repo.
(file #30040)
|
Tue 17 Dec 2013 05:35:20 PM UTC, comment #3:
Sorry, I typed "cdf" and return in the prompt (recent dev) and obtained
I did not read the end of the warning which said:
So you are right, cdf is not implemented yet from what I can see in the current inst directory of statistics package.
|
Tue 17 Dec 2013 02:01:07 PM UTC, comment #2:
Pantxo, are you sure? I don't see the cdf function anywhere in the current statistics package. I agree that's where it probably should be implemented, though.
|
Tue 17 Dec 2013 08:13:49 AM UTC, comment #1:
The cdf function is already implemented in the statistics package from octave-forge. I am pretty sure it was implemented, as every function in Octave, by clean reverse engineering : read matlab documentation and mimic the original behavior but never read the matlab source.
|
Tue 17 Dec 2013 04:14:35 AM UTC, original submission:
The cdf function is missing in Octave 3.6.4. What cdf does in matlab is actually to call the right cdf specified by the distribution name (the first input argument to cdf is a string indicating the name of the distribution). One could manually add this function to the folder 'C:\Octave\Octave-3.6.4\share\octave\3.6.4\m\statistics\distributions', and then it behaves the same as it does under Matlab. I consider it a buy since Octave should behave the same as Matlab.
PS. The function code can be obtained in Matlab by using the following command:
type cdf
|