2011/9/10 YuHong <hyu0...@hotmail.com>:
> Hello,
>
> I followed MatLab's financial toolbox manual, and just added a function
> 'corr2cov.m' for octave's financial package. Is it ok to submit to
> octave-forge repository? Or how to do so? Thanks & look forward to
> suggestions!
>
> Best regards,
>
> Hong Yu
Hi,
always send this kind of stuff to the octave-forge mailing list
(octave-dev@lists.sourceforge.net) and never to me directly. I'm
CC'ing this to the mailing list so you won't have to do it again
To get it included something in the package just send it to the
community (through the mailing list -- which I am already doing now)
or submit to the patches section in sourceforge (
http://sourceforge.net/tracker/?group_id=2888&atid=302888 ). Once
someone reviews your code they will add it to the repository (I also
CC'ed the maintainer of the financial package, Bill Denney). If you
keep submitting stuff, someone will eventually give you write-access
to the repository. In the mean time, the community will have to review
your submissions first.
I don't know anything about the subject of your function but if no one
reviews it in the next week or so, send another mail to the mailing
list and I will add it (someone can remove or fix it later).
Carnë
## Copyright (C) 2011 Hong Yu
##
## This program is free software; you can redistribute it and/or modify it
## under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or (at
## your option) any later version.
##
## This program is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; see the file COPYING. If not, see
## <http://www.gnu.org/licenses/>.
## -*- texinfo -*-
## @deftypefn {Function File} {} corr2cov (@var{sigma}, @var{corr})
## Returns the covariance value or matrix.
##
##
## Note that the rate @var{r} is specified as a fraction (i.e., 0.05,
## not 5 percent).
## @seealso{corrcoef, cov, cov2corr, ewstats, std}
## @end deftypefn
## Author: Hong Yu <hyu0...@hotmail.com>
## Description: Convert standard deviation and correlation to covariance
function ret = corr2cov (sigma, corr)
if ( nargin != 2 )
print_usage ();
endif
ret = corr;
csize = size(corr);
for i = 1:csize(1)
for j = 1:csize(2)
ret(i,j) *= sigma(i) * sigma(j);
endfor
endfor
endfunction
------------------------------------------------------------------------------
Malware Security Report: Protecting Your Business, Customers, and the
Bottom Line. Protect your business and customers by understanding the
threat from malware and how it can impact your online business.
http://www.accelacomm.com/jaw/sfnl/114/51427462/
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev