|
From: sissou <syl...@gm...> - 2006-08-17 07:29:25
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
David Bateman a écrit :
<blockquote cite="mid...@mo..." type="cite">sissou
wrote:
<br>
<blockquote type="cite">Hello,
<br>
<br>
Can someone add me as developper please, my sourceforge user id is
sis-sou.
<br>
Thanks.
<br>
</blockquote>
<br>
Hi Sissou,
<br>
<br>
In general it is fairly easy to get developer access to octave-forge,
but its generally considered to be good etiquette to show some code to
give an idea of what you want to add. I don't recognize you from the
lists, though perhaps I missed something. Please send some code to
discuss to the lists and then I'd have no trouble adding you...
<br>
<br>
Cheers
<br>
David
<br>
<br>
<br>
<br>
</blockquote>
<font face="DejaVu Sans">Ok, so I wrote <i>expint_Ei,</i> <i>expint_E1</i>
ant <i>expint </i></font><font face="DejaVu Sans">functions </font><font
face="DejaVu Sans"><i>(expint is expint_E1 but I did it only for
matlab compatibility)</i>.<br>
This is the code :</font><br>
<div align="left"><br>
<font face="DejaVu Sans">expint_Ei.m :</font><br>
<br>
</div>
<font face="DejaVu Sans"><i>## Copyright (C) 2006 Sissou
<a class="moz-txt-link-rfc2396E" href="mailto:syl...@gm..."><syl...@gm...></a><br>
##<br>
## This program is free software; you can redistribute it and/or modify<br>
## it under the terms of the GNU General Public License as published by<br>
## the Free Software Foundation; either version 2 of the License, or<br>
## (at your option) any later version.<br>
##<br>
## This program is distributed in the hope that it will be useful,<br>
## but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
## GNU General Public License for more details.<br>
##<br>
## You should have received a copy of the GNU General Public License<br>
## along with this program; if not, write to the Free Software<br>
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA<br>
<br>
## EXPINT_EI compute the exponential integral,<br>
##<br>
## infinity<br>
## /<br>
## expint(x) = - | exp(t)/t dt<br>
## /<br>
## -x<br>
##<br>
## See also expint, expint_E1.<br>
<br>
function y = expint_Ei(x)<br>
if (nargin != 1)<br>
usage ("expint_Ei(x)");<br>
endif<br>
<br>
if(x<0)<br>
y = -quad("expintbase",-x,Inf);<br>
else<br>
y = 0;<br>
for i = 1:100;<br>
y = y + x.^i./(i.*factorial(i));<br>
endfor<br>
<br>
y = 0.577215664901532860606512090082402431 + log(x) + y;<br>
endif;<br>
endfunction;<br>
<br>
expint_E1.m :<br>
<br>
## Copyright (C) 2006 Sissou <a class="moz-txt-link-rfc2396E" href="mailto:syl...@gm..."><syl...@gm...></a><br>
##<br>
## This program is free software; you can redistribute it and/or modify<br>
## it under the terms of the GNU General Public License as published by<br>
## the Free Software Foundation; either version 2 of the License, or<br>
## (at your option) any later version.<br>
##<br>
## This program is distributed in the hope that it will be useful,<br>
## but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
## GNU General Public License for more details.<br>
##<br>
## You should have received a copy of the GNU General Public License<br>
## along with this program; if not, write to the Free Software<br>
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA<br>
<br>
## EXPINT_E1 compute the exponential integral,<br>
##<br>
## infinity<br>
## /<br>
## expint(x) = | exp(t)/t dt<br>
## /<br>
## x<br>
##<br>
## See also expint_Ei, expint.<br>
<br>
function v = expint_E1(x)<br>
if (nargin != 1)<br>
usage ("expint_E1(x)");<br>
endif<br>
if(x > 0 && imag(x) == 0)<br>
v = -expint_Ei(-x);<br>
else<br>
v = -expint_Ei(-x) - i.*pi;<br>
endif<br>
endfunction<br>
<br>
expint.m :<br>
<br>
## Copyright (C) 2006 Sissou <a class="moz-txt-link-rfc2396E" href="mailto:syl...@gm..."><syl...@gm...></a><br>
##<br>
## This program is free software; you can redistribute it and/or modify<br>
## it under the terms of the GNU General Public License as published by<br>
## the Free Software Foundation; either version 2 of the License, or<br>
## (at your option) any later version.<br>
##<br>
## This program is distributed in the hope that it will be useful,<br>
## but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
## GNU General Public License for more details.<br>
##<br>
## You should have received a copy of the GNU General Public License<br>
## along with this program; if not, write to the Free Software<br>
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA<br>
<br>
## EXPINT compute the exponential integral,<br>
##<br>
## infinity<br>
## /<br>
## expint(x) = | exp(t)/t dt<br>
## /<br>
## x<br>
##<br>
## See also expint_Ei, expint_E1.<br>
<br>
function y = expint(x)<br>
if (nargin != 1)<br>
usage ("expint(x)");<br>
endif<br>
y = expint_E1(x);<br>
endfuncion;<br>
<br>
</i>And after that I would like to make some other special functions
and work one the fill function because it's very ugly.<br>
Sorry for didn't explain that before.<br>
</font>
</body>
</html>
|