This list is closed, nobody may subscribe to it.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(10) |
Aug
(5) |
Sep
(3) |
Oct
(41) |
Nov
(41) |
Dec
(33) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(75) |
Feb
(10) |
Mar
(170) |
Apr
(174) |
May
(66) |
Jun
(11) |
Jul
(10) |
Aug
(44) |
Sep
(73) |
Oct
(28) |
Nov
(139) |
Dec
(52) |
2003 |
Jan
(35) |
Feb
(93) |
Mar
(62) |
Apr
(10) |
May
(55) |
Jun
(70) |
Jul
(37) |
Aug
(16) |
Sep
(56) |
Oct
(31) |
Nov
(57) |
Dec
(83) |
2004 |
Jan
(85) |
Feb
(67) |
Mar
(27) |
Apr
(37) |
May
(75) |
Jun
(85) |
Jul
(160) |
Aug
(68) |
Sep
(104) |
Oct
(25) |
Nov
(39) |
Dec
(23) |
2005 |
Jan
(10) |
Feb
(45) |
Mar
(43) |
Apr
(19) |
May
(108) |
Jun
(31) |
Jul
(41) |
Aug
(23) |
Sep
(65) |
Oct
(58) |
Nov
(44) |
Dec
(54) |
2006 |
Jan
(96) |
Feb
(27) |
Mar
(69) |
Apr
(59) |
May
(67) |
Jun
(35) |
Jul
(13) |
Aug
(461) |
Sep
(160) |
Oct
(399) |
Nov
(32) |
Dec
(72) |
2007 |
Jan
(316) |
Feb
(305) |
Mar
(318) |
Apr
(54) |
May
(194) |
Jun
(173) |
Jul
(282) |
Aug
(91) |
Sep
(227) |
Oct
(365) |
Nov
(168) |
Dec
(18) |
2008 |
Jan
(71) |
Feb
(111) |
Mar
(155) |
Apr
(173) |
May
(70) |
Jun
(67) |
Jul
(55) |
Aug
(83) |
Sep
(32) |
Oct
(68) |
Nov
(80) |
Dec
(29) |
2009 |
Jan
(46) |
Feb
(18) |
Mar
(95) |
Apr
(76) |
May
(140) |
Jun
(98) |
Jul
(84) |
Aug
(123) |
Sep
(94) |
Oct
(131) |
Nov
(142) |
Dec
(125) |
2010 |
Jan
(128) |
Feb
(158) |
Mar
(172) |
Apr
(134) |
May
(94) |
Jun
(84) |
Jul
(32) |
Aug
(127) |
Sep
(167) |
Oct
(109) |
Nov
(69) |
Dec
(78) |
2011 |
Jan
(39) |
Feb
(58) |
Mar
(52) |
Apr
(47) |
May
(56) |
Jun
(76) |
Jul
(55) |
Aug
(54) |
Sep
(165) |
Oct
(255) |
Nov
(328) |
Dec
(263) |
2012 |
Jan
(82) |
Feb
(147) |
Mar
(400) |
Apr
(216) |
May
(209) |
Jun
(160) |
Jul
(86) |
Aug
(141) |
Sep
(156) |
Oct
(6) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(2) |
2016 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(4) |
Jun
(8) |
Jul
(2) |
Aug
(5) |
Sep
(9) |
Oct
|
Nov
|
Dec
|
From: <as...@us...> - 2012-05-01 16:58:07
|
Revision: 10348 http://octave.svn.sourceforge.net/octave/?rev=10348&view=rev Author: asnelt Date: 2012-05-01 16:58:01 +0000 (Tue, 01 May 2012) Log Message: ----------- Fix typo. Modified Paths: -------------- trunk/octave-forge/main/statistics/inst/kmeans.m Modified: trunk/octave-forge/main/statistics/inst/kmeans.m =================================================================== --- trunk/octave-forge/main/statistics/inst/kmeans.m 2012-05-01 16:44:39 UTC (rev 10347) +++ trunk/octave-forge/main/statistics/inst/kmeans.m 2012-05-01 16:58:01 UTC (rev 10348) @@ -80,7 +80,7 @@ ## Calcualte new centroids for i = 1:k ## Check for empty clusters - if (sum (classe s== i) ==0 || length (mean (data(classes == i, :))) == 0) + if (sum (classes == i) ==0 || length (mean (data(classes == i, :))) == 0) switch emptyaction ## if 'singleton', then find the point that is the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <as...@us...> - 2012-05-01 16:44:46
|
Revision: 10347 http://octave.svn.sourceforge.net/octave/?rev=10347&view=rev Author: asnelt Date: 2012-05-01 16:44:39 +0000 (Tue, 01 May 2012) Log Message: ----------- Update for version 1.1.2. Modified Paths: -------------- trunk/octave-forge/main/statistics/DESCRIPTION Modified: trunk/octave-forge/main/statistics/DESCRIPTION =================================================================== --- trunk/octave-forge/main/statistics/DESCRIPTION 2012-05-01 16:20:43 UTC (rev 10346) +++ trunk/octave-forge/main/statistics/DESCRIPTION 2012-05-01 16:44:39 UTC (rev 10347) @@ -1,6 +1,6 @@ Name: Statistics -Version: 1.1.1 -Date: 2012-04-12 +Version: 1.1.2 +Date: 2012-05-01 Author: various authors Maintainer: Arno Onken <as...@as...> Title: Statistics This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <as...@us...> - 2012-05-01 16:20:49
|
Revision: 10346 http://octave.svn.sourceforge.net/octave/?rev=10346&view=rev Author: asnelt Date: 2012-05-01 16:20:43 +0000 (Tue, 01 May 2012) Log Message: ----------- Initial commit. Modified Paths: -------------- trunk/octave-forge/main/statistics/INDEX trunk/octave-forge/main/statistics/NEWS Added Paths: ----------- trunk/octave-forge/main/statistics/inst/mnpdf.m Modified: trunk/octave-forge/main/statistics/INDEX =================================================================== --- trunk/octave-forge/main/statistics/INDEX 2012-05-01 16:18:26 UTC (rev 10345) +++ trunk/octave-forge/main/statistics/INDEX 2012-05-01 16:20:43 UTC (rev 10346) @@ -16,7 +16,7 @@ jsupdf lognstat mvnpdf mvnrnd mvncdf - mnrnd + mnpdf mnrnd mvtcdf nbinstat normalise_distribution Modified: trunk/octave-forge/main/statistics/NEWS =================================================================== --- trunk/octave-forge/main/statistics/NEWS 2012-05-01 16:18:26 UTC (rev 10345) +++ trunk/octave-forge/main/statistics/NEWS 2012-05-01 16:20:43 UTC (rev 10346) @@ -3,7 +3,7 @@ ** The following functions are new in 1.1.2: - mnrnd + mnpdf mnrnd ** The package is now dependent on the io package (version 1.0.18 or later) since the functions that it depended of from miscellaneous Added: trunk/octave-forge/main/statistics/inst/mnpdf.m =================================================================== --- trunk/octave-forge/main/statistics/inst/mnpdf.m (rev 0) +++ trunk/octave-forge/main/statistics/inst/mnpdf.m 2012-05-01 16:20:43 UTC (rev 10346) @@ -0,0 +1,132 @@ +## Copyright (C) 2012 Arno Onken +## +## 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. If not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## @deftypefn {Function File} {@var{y} =} mnpdf (@var{x}, @var{p}) +## Compute the probability density function of the multinomial distribution. +## +## @subheading Arguments +## +## @itemize @bullet +## @item +## @var{x} is vector with a single sample of a multinomial distribution with +## parameter @var{p} or a matrix of random samples from multinomial +## distributions. In the latter case, each row of @var{x} is a sample from a +## multinomial distribution with the corresponding row of @var{p} being its +## parameter. +## +## @item +## @var{p} is a vector with the probabilities of the categories or a matrix +## with each row containing the probabilities of a multinomial sample. +## @end itemize +## +## @subheading Return values +## +## @itemize @bullet +## @item +## @var{y} is a vector of probabilites of the random samples @var{x} from the +## multinomial distribution with corresponding parameter @var{p}. The parameter +## @var{n} of the multinomial distribution is the sum of the elements of each +## row of @var{x}. The length of @var{y} is the number of columns of @var{x}. +## If a row of @var{p} does not sum to @code{1}, then the corresponding element +## of @var{y} will be @code{NaN}. +## @end itemize +## +## @subheading Examples +## +## @example +## @group +## x = [1, 4, 2]; +## p = [0.2, 0.5, 0.3]; +## y = mnpdf (x, p); +## @end group +## +## @group +## x = [1, 4, 2; 1, 0, 9]; +## p = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; +## y = mnpdf (x, p); +## @end group +## @end example +## +## @subheading References +## +## @enumerate +## @item +## Wendy L. Martinez and Angel R. Martinez. @cite{Computational Statistics +## Handbook with MATLAB}. Appendix E, pages 547-557, Chapman & Hall/CRC, 2001. +## +## @item +## Merran Evans, Nicholas Hastings and Brian Peacock. @cite{Statistical +## Distributions}. pages 134-136, Wiley, New York, third edition, 2000. +## @end enumerate +## @end deftypefn + +## Author: Arno Onken <as...@as...> +## Description: PDF of the multinomial distribution + +function y = mnpdf (x, p) + + # Check arguments + if (nargin != 2) + print_usage (); + endif + + if (! ismatrix (x) || any (x(:) < 0 | round (x(:) != x(:)))) + error ("mnpdf: x must be a matrix of non-negative integer values"); + endif + if (! ismatrix (p) || any (p(:) < 0)) + error ("mnpdf: p must be a non-empty matrix with rows of probabilities"); + endif + + # Adjust input sizes + if (! isvector (x) || ! isvector (p)) + if (isvector (x)) + x = x(:)'; + endif + if (isvector (p)) + p = p(:)'; + endif + if (size (x, 1) == 1 && size (p, 1) > 1) + x = repmat (x, size (p, 1), 1); + elseif (size (x, 1) > 1 && size (p, 1) == 1) + p = repmat (p, size (x, 1), 1); + endif + endif + # Continue argument check + if (any (size (x) != size (p))) + error ("mnpdf: x and p must have compatible sizes"); + endif + + # Count total number of elements of each multinomial sample + n = sum (x, 2); + # Compute probability density function of the multinomial distribution + t = x .* log (p); + t(x == 0) = 0; + y = exp (gammaln (n+1) - sum (gammaln (x+1), 2) + sum (t, 2)); + y(sum (p, 2) != 1) = NaN; + +endfunction + +%!test +%! x = [1, 4, 2]; +%! p = [0.2, 0.5, 0.3]; +%! y = mnpdf (x, p); +%! assert (y, 0.11812, 0.001); + +%!test +%! x = [1, 4, 2; 1, 0, 9]; +%! p = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; +%! y = mnpdf (x, p); +%! assert (y, [0.11812; 0.13422], 0.001); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <as...@us...> - 2012-05-01 16:18:32
|
Revision: 10345 http://octave.svn.sourceforge.net/octave/?rev=10345&view=rev Author: asnelt Date: 2012-05-01 16:18:26 +0000 (Tue, 01 May 2012) Log Message: ----------- Replaced reference to statistics book. Modified Paths: -------------- trunk/octave-forge/main/statistics/inst/mnrnd.m Modified: trunk/octave-forge/main/statistics/inst/mnrnd.m =================================================================== --- trunk/octave-forge/main/statistics/inst/mnrnd.m 2012-05-01 12:41:10 UTC (rev 10344) +++ trunk/octave-forge/main/statistics/inst/mnrnd.m 2012-05-01 16:18:26 UTC (rev 10345) @@ -27,7 +27,7 @@ ## sample. The elements of @var{n} must be non-negative integers. ## ## @item -## @var{n} is the second parameter of the multinomial distribution. @var{p} can +## @var{p} is the second parameter of the multinomial distribution. @var{p} can ## be a vector with the probabilities of the categories or a matrix with each ## row containing the probabilities of a multinomial sample. If @var{p} has ## more than one row and @var{n} is non-scalar, then the number of rows of @@ -37,6 +37,7 @@ ## @var{s} is the number of multinomial samples to be generated. @var{s} must ## be a non-negative integer. If @var{s} is specified, then @var{n} must be ## scalar and @var{p} must be a vector. +## @end itemize ## ## @subheading Return values ## @@ -56,19 +57,19 @@ ## @example ## @group ## n = 10; -## p = [0.2 0.5 0.3]; +## p = [0.2, 0.5, 0.3]; ## x = mnrnd (n, p); ## @end group ## ## @group ## n = 10 * ones (3, 1); -## p = [0.2 0.5 0.3]; +## p = [0.2, 0.5, 0.3]; ## x = mnrnd (n, p); ## @end group ## ## @group ## n = (1:2)'; -## p = [0.2 0.5 0.3; 0.1 0.1 0.8]; +## p = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; ## x = mnrnd (n, p); ## @end group ## @end example @@ -81,8 +82,8 @@ ## Handbook with MATLAB}. Appendix E, pages 547-557, Chapman & Hall/CRC, 2001. ## ## @item -## Athanasios Papoulis. @cite{Probability, Random Variables, and Stochastic -## Processes}. pages 104 and 148, McGraw-Hill, New York, second edition, 1984. +## Merran Evans, Nicholas Hastings and Brian Peacock. @cite{Statistical +## Distributions}. pages 134-136, Wiley, New York, third edition, 2000. ## @end enumerate ## @end deftypefn @@ -156,7 +157,7 @@ %!test %! n = 10; -%! p = [0.2 0.5 0.3]; +%! p = [0.2, 0.5, 0.3]; %! x = mnrnd (n, p); %! assert (size (x), size (p)); %! assert (all (x >= 0)); @@ -165,7 +166,7 @@ %!test %! n = 10 * ones (3, 1); -%! p = [0.2 0.5 0.3]; +%! p = [0.2, 0.5, 0.3]; %! x = mnrnd (n, p); %! assert (size (x), [length(n) length(p)]); %! assert (all (x >= 0)); @@ -174,7 +175,7 @@ %!test %! n = (1:2)'; -%! p = [0.2 0.5 0.3; 0.1 0.1 0.8]; +%! p = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; %! x = mnrnd (n, p); %! assert (size (x), size (p)); %! assert (all (x >= 0)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-05-01 12:41:17
|
Revision: 10344 http://octave.svn.sourceforge.net/octave/?rev=10344&view=rev Author: carandraug Date: 2012-05-01 12:41:10 +0000 (Tue, 01 May 2012) Log Message: ----------- __ellip_ws, __ellip_ws_min, ncauer: the functions __ellip_ws and __ellip_ws_min are now subfunctions of ncauer. Usage text on both mention them to be subfunctions of ncauer and nellip. nellip no longer exists, it was renamed ellip on revision 444. Loking at its code, this function was never dependent on any of the __ellip_ws functions, only on ncauer. Revision Links: -------------- http://octave.svn.sourceforge.net/octave/?rev=444&view=rev Modified Paths: -------------- trunk/octave-forge/main/signal/NEWS trunk/octave-forge/main/signal/inst/ncauer.m Removed Paths: ------------- trunk/octave-forge/main/signal/inst/__ellip_ws.m trunk/octave-forge/main/signal/inst/__ellip_ws_min.m Modified: trunk/octave-forge/main/signal/NEWS =================================================================== --- trunk/octave-forge/main/signal/NEWS 2012-05-01 12:21:00 UTC (rev 10343) +++ trunk/octave-forge/main/signal/NEWS 2012-05-01 12:41:10 UTC (rev 10344) @@ -6,6 +6,9 @@ ** Package is no longer automatically loaded + ** The functions `__ellip_ws' and `__ellip_ws_min' have been removed (they + are now subfunctions of `ncauer'. + =============================================================================== signal-1.1.2 Release Date: 2012-01-06 Release Manager: Lukas Reichlin =============================================================================== Deleted: trunk/octave-forge/main/signal/inst/__ellip_ws.m =================================================================== --- trunk/octave-forge/main/signal/inst/__ellip_ws.m 2012-05-01 12:21:00 UTC (rev 10343) +++ trunk/octave-forge/main/signal/inst/__ellip_ws.m 2012-05-01 12:41:10 UTC (rev 10344) @@ -1,35 +0,0 @@ -## Copyright (C) 2001 Paulo Neis <p_...@ya...> -## -## 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; if not, see <http://www.gnu.org/licenses/>. - -## usage: ws = __ellip_ws(n, rp, rs) -## -##Function used by nellip()/ncauer(). -##Calculate the stop band edge for the Cauer filter. -## -## References: -## -## - Serra, Celso Penteado, Teoria e Projeto de Filtros, Campinas: CARTGRAF, -## 1983. - -function ws=__ellip_ws(n, rp, rs) - kl0 = ((10^(0.1*rp)-1)/(10^(0.1*rs)-1)); - k0 = (1-kl0); - int = ellipke([kl0 ; k0]); - ql0 = int(1); - q0 = int(2); - x = n*ql0/q0; - kl = fminbnd(@(y) __ellip_ws_min(y,x) ,eps, 1-eps); - ws = sqrt(1/kl); -endfunction Deleted: trunk/octave-forge/main/signal/inst/__ellip_ws_min.m =================================================================== --- trunk/octave-forge/main/signal/inst/__ellip_ws_min.m 2012-05-01 12:21:00 UTC (rev 10343) +++ trunk/octave-forge/main/signal/inst/__ellip_ws_min.m 2012-05-01 12:41:10 UTC (rev 10344) @@ -1,32 +0,0 @@ -## Copyright (C) 2001 Paulo Neis <p_...@ya...> -## -## 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; if not, see <http://www.gnu.org/licenses/>. - -## usage: err = __ellip_ws_min(kl, x) -## -## Function used by nellip()/ncauer(). -## -## References: -## -## - Serra, Celso Penteado, Teoria e Projeto de Filtros, Campinas: CARTGRAF, -## 1983. - -function err=__ellip_ws_min(kl, x) - - int=ellipke([kl; 1-kl]); - ql=int(1); - q=int(2); - err=abs((ql/q)-x); - -endfunction Modified: trunk/octave-forge/main/signal/inst/ncauer.m =================================================================== --- trunk/octave-forge/main/signal/inst/ncauer.m 2012-05-01 12:21:00 UTC (rev 10343) +++ trunk/octave-forge/main/signal/inst/ncauer.m 2012-05-01 12:41:10 UTC (rev 10344) @@ -110,3 +110,24 @@ zer=(sqrt(ws)).*zer; endfunction + +## usage: ws = __ellip_ws(n, rp, rs) +## Calculate the stop band edge for the Cauer filter. +function ws=__ellip_ws(n, rp, rs) + kl0 = ((10^(0.1*rp)-1)/(10^(0.1*rs)-1)); + k0 = (1-kl0); + int = ellipke([kl0 ; k0]); + ql0 = int(1); + q0 = int(2); + x = n*ql0/q0; + kl = fminbnd(@(y) __ellip_ws_min(y,x) ,eps, 1-eps); + ws = sqrt(1/kl); +endfunction + +## usage: err = __ellip_ws_min(kl, x) +function err=__ellip_ws_min(kl, x) + int=ellipke([kl; 1-kl]); + ql=int(1); + q=int(2); + err=abs((ql/q)-x); +endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-05-01 12:21:06
|
Revision: 10343 http://octave.svn.sourceforge.net/octave/?rev=10343&view=rev Author: carandraug Date: 2012-05-01 12:21:00 +0000 (Tue, 01 May 2012) Log Message: ----------- signal: update licenses to GPLv3+ and mewntion public domain on DESCRIPTION Modified Paths: -------------- trunk/octave-forge/main/signal/DESCRIPTION trunk/octave-forge/main/signal/inst/__ellip_ws_min.m trunk/octave-forge/main/signal/inst/filtfilt.m trunk/octave-forge/main/signal/inst/private/h1_z_deriv.m trunk/octave-forge/main/signal/inst/private/inv_residue.m trunk/octave-forge/main/signal/inst/private/polyrev.m trunk/octave-forge/main/signal/inst/private/to_real.m Modified: trunk/octave-forge/main/signal/DESCRIPTION =================================================================== --- trunk/octave-forge/main/signal/DESCRIPTION 2012-05-01 11:57:51 UTC (rev 10342) +++ trunk/octave-forge/main/signal/DESCRIPTION 2012-05-01 12:21:00 UTC (rev 10343) @@ -7,5 +7,5 @@ Description: Signal processing tools, including filtering, windowing and display functions. Depends: octave (>= 3.6.0), optim (>= 1.0.0), specfun, control (>= 2.2.3), communications Autoload: no -License: GPL version 3 or later +License: GPLv3+, public domain Url: http://octave.sf.net Modified: trunk/octave-forge/main/signal/inst/__ellip_ws_min.m =================================================================== --- trunk/octave-forge/main/signal/inst/__ellip_ws_min.m 2012-05-01 11:57:51 UTC (rev 10342) +++ trunk/octave-forge/main/signal/inst/__ellip_ws_min.m 2012-05-01 12:21:00 UTC (rev 10343) @@ -1,18 +1,17 @@ ## Copyright (C) 2001 Paulo Neis <p_...@ya...> ## -## 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 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. +## 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; If not, see <http://www.gnu.org/licenses/>. -## +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## usage: err = __ellip_ws_min(kl, x) ## Modified: trunk/octave-forge/main/signal/inst/filtfilt.m =================================================================== --- trunk/octave-forge/main/signal/inst/filtfilt.m 2012-05-01 11:57:51 UTC (rev 10342) +++ trunk/octave-forge/main/signal/inst/filtfilt.m 2012-05-01 12:21:00 UTC (rev 10343) @@ -2,18 +2,18 @@ ## Copyright (C) 2007 Francesco Potortì <po...@gn...> ## Copyright (C) 2008 Luca Citi <lc...@es...> ## -## 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 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. +## 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; If not, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## usage: y = filtfilt(b, a, x) ## Modified: trunk/octave-forge/main/signal/inst/private/h1_z_deriv.m =================================================================== --- trunk/octave-forge/main/signal/inst/private/h1_z_deriv.m 2012-05-01 11:57:51 UTC (rev 10342) +++ trunk/octave-forge/main/signal/inst/private/h1_z_deriv.m 2012-05-01 12:21:00 UTC (rev 10343) @@ -1,20 +1,20 @@ -## Copyright 2007 R.G.H. Eschauzier <res...@ya...> -## Adapted by Carnë Draug on 2011 <car...@gm...> +## Copyright (C) 2007 R.G.H. Eschauzier <res...@ya...> ## -## 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 2 of the License, or -## (at your option) any later version. +## 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. +## 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; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. +## Adapted by Carnë Draug on 2011 <car...@gm...> + ## This function is necessary for impinvar and invimpinvar of the signal package ## Find {-zd/dz}^n*H1(z). I.e., first differentiate, then multiply by -z, then differentiate, etc. Modified: trunk/octave-forge/main/signal/inst/private/inv_residue.m =================================================================== --- trunk/octave-forge/main/signal/inst/private/inv_residue.m 2012-05-01 11:57:51 UTC (rev 10342) +++ trunk/octave-forge/main/signal/inst/private/inv_residue.m 2012-05-01 12:21:00 UTC (rev 10343) @@ -1,19 +1,19 @@ -## Copyright 2007 R.G.H. Eschauzier <res...@ya...> +## Copyright (C) 2007 R.G.H. Eschauzier <res...@ya...> +## +## 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; if not, see <http://www.gnu.org/licenses/>. + ## Adapted by Carnë Draug on 2011 <car...@gm...> -## -## 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 2 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; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## This function is necessary for impinvar and invimpinvar of the signal package Modified: trunk/octave-forge/main/signal/inst/private/polyrev.m =================================================================== --- trunk/octave-forge/main/signal/inst/private/polyrev.m 2012-05-01 11:57:51 UTC (rev 10342) +++ trunk/octave-forge/main/signal/inst/private/polyrev.m 2012-05-01 12:21:00 UTC (rev 10343) @@ -1,19 +1,19 @@ -## Copyright 2007 R.G.H. Eschauzier <res...@ya...> +## Copyright (C) 2007 R.G.H. Eschauzier <res...@ya...> +## +## 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; if not, see <http://www.gnu.org/licenses/>. + ## Adapted by Carnë Draug on 2011 <car...@gm...> -## -## 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 2 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; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## This function is necessary for impinvar and invimpinvar of the signal package Modified: trunk/octave-forge/main/signal/inst/private/to_real.m =================================================================== --- trunk/octave-forge/main/signal/inst/private/to_real.m 2012-05-01 11:57:51 UTC (rev 10342) +++ trunk/octave-forge/main/signal/inst/private/to_real.m 2012-05-01 12:21:00 UTC (rev 10343) @@ -1,19 +1,19 @@ -## Copyright 2007 R.G.H. Eschauzier <res...@ya...> +## Copyright (C) 2007 R.G.H. Eschauzier <res...@ya...> +## +## 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; if not, see <http://www.gnu.org/licenses/>. + ## Adapted by Carnë Draug on 2011 <car...@gm...> -## -## 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 2 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; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## This function is necessary for impinvar and invimpinvar of the signal package This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-05-01 11:57:57
|
Revision: 10342 http://octave.svn.sourceforge.net/octave/?rev=10342&view=rev Author: carandraug Date: 2012-05-01 11:57:51 +0000 (Tue, 01 May 2012) Log Message: ----------- signal: package is no longer automatically loaded Modified Paths: -------------- trunk/octave-forge/main/signal/DESCRIPTION trunk/octave-forge/main/signal/NEWS Modified: trunk/octave-forge/main/signal/DESCRIPTION =================================================================== --- trunk/octave-forge/main/signal/DESCRIPTION 2012-05-01 11:55:55 UTC (rev 10341) +++ trunk/octave-forge/main/signal/DESCRIPTION 2012-05-01 11:57:51 UTC (rev 10342) @@ -6,6 +6,6 @@ Title: Signal Processing. Description: Signal processing tools, including filtering, windowing and display functions. Depends: octave (>= 3.6.0), optim (>= 1.0.0), specfun, control (>= 2.2.3), communications -Autoload: yes +Autoload: no License: GPL version 3 or later Url: http://octave.sf.net Modified: trunk/octave-forge/main/signal/NEWS =================================================================== --- trunk/octave-forge/main/signal/NEWS 2012-05-01 11:55:55 UTC (rev 10341) +++ trunk/octave-forge/main/signal/NEWS 2012-05-01 11:57:51 UTC (rev 10342) @@ -1,6 +1,12 @@ Summary of important user-visible changes for releases of the signal package =============================================================================== +signal-x.y.z Release Date: yyyy-mm-dd Release Manager: +=============================================================================== + + ** Package is no longer automatically loaded + +=============================================================================== signal-1.1.2 Release Date: 2012-01-06 Release Manager: Lukas Reichlin =============================================================================== This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-05-01 11:56:01
|
Revision: 10341 http://octave.svn.sourceforge.net/octave/?rev=10341&view=rev Author: carandraug Date: 2012-05-01 11:55:55 +0000 (Tue, 01 May 2012) Log Message: ----------- signal: package depends on communications since bitrevorder uses bi2de and de2bi. This makes the dependency circular but it's ok since pkg can install both package at same time Modified Paths: -------------- trunk/octave-forge/main/signal/DESCRIPTION Modified: trunk/octave-forge/main/signal/DESCRIPTION =================================================================== --- trunk/octave-forge/main/signal/DESCRIPTION 2012-04-30 21:55:57 UTC (rev 10340) +++ trunk/octave-forge/main/signal/DESCRIPTION 2012-05-01 11:55:55 UTC (rev 10341) @@ -5,7 +5,7 @@ Maintainer: The Octave Community Title: Signal Processing. Description: Signal processing tools, including filtering, windowing and display functions. -Depends: octave (>= 3.6.0), optim (>= 1.0.0), specfun, control (>= 2.2.3) +Depends: octave (>= 3.6.0), optim (>= 1.0.0), specfun, control (>= 2.2.3), communications Autoload: yes License: GPL version 3 or later Url: http://octave.sf.net This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <as...@us...> - 2012-04-30 21:56:03
|
Revision: 10340 http://octave.svn.sourceforge.net/octave/?rev=10340&view=rev Author: asnelt Date: 2012-04-30 21:55:57 +0000 (Mon, 30 Apr 2012) Log Message: ----------- Renamed end to endfor. Modified Paths: -------------- trunk/octave-forge/main/statistics/inst/mnrnd.m Modified: trunk/octave-forge/main/statistics/inst/mnrnd.m =================================================================== --- trunk/octave-forge/main/statistics/inst/mnrnd.m 2012-04-30 21:53:25 UTC (rev 10339) +++ trunk/octave-forge/main/statistics/inst/mnrnd.m 2012-04-30 21:55:57 UTC (rev 10340) @@ -150,7 +150,7 @@ else x(i, :) = NaN; endif - end + endfor endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <as...@us...> - 2012-04-30 21:53:31
|
Revision: 10339 http://octave.svn.sourceforge.net/octave/?rev=10339&view=rev Author: asnelt Date: 2012-04-30 21:53:25 +0000 (Mon, 30 Apr 2012) Log Message: ----------- Renamed a couple of end to endif. Modified Paths: -------------- trunk/octave-forge/main/statistics/inst/raylrnd.m Modified: trunk/octave-forge/main/statistics/inst/raylrnd.m =================================================================== --- trunk/octave-forge/main/statistics/inst/raylrnd.m 2012-04-30 21:50:12 UTC (rev 10338) +++ trunk/octave-forge/main/statistics/inst/raylrnd.m 2012-04-30 21:53:25 UTC (rev 10339) @@ -94,7 +94,7 @@ elseif (nargin == 2) if (! isvector (r) || any ((r < 0) | round (r) != r)) error ("raylrnd: sz must be a vector of non-negative integers") - end + endif sz = r(:)'; if (! isscalar (sigma) && ! isempty (sigma) && (length (size (sigma)) != length (sz) || any (size (sigma) != sz))) error ("raylrnd: sigma must be scalar or of size sz"); @@ -102,10 +102,10 @@ elseif (nargin == 3) if (! isscalar (r) || any ((r < 0) | round (r) != r)) error ("raylrnd: r must be a non-negative integer") - end + endif if (! isscalar (c) || any ((c < 0) | round (c) != c)) error ("raylrnd: c must be a non-negative integer") - end + endif sz = [r, c]; if (! isscalar (sigma) && ! isempty (sigma) && (length (size (sigma)) != length (sz) || any (size (sigma) != sz))) error ("raylrnd: sigma must be scalar or of size [r, c]"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <as...@us...> - 2012-04-30 21:50:19
|
Revision: 10338 http://octave.svn.sourceforge.net/octave/?rev=10338&view=rev Author: asnelt Date: 2012-04-30 21:50:12 +0000 (Mon, 30 Apr 2012) Log Message: ----------- Initial commit. Modified Paths: -------------- trunk/octave-forge/main/statistics/INDEX trunk/octave-forge/main/statistics/NEWS Added Paths: ----------- trunk/octave-forge/main/statistics/inst/mnrnd.m Modified: trunk/octave-forge/main/statistics/INDEX =================================================================== --- trunk/octave-forge/main/statistics/INDEX 2012-04-30 17:13:19 UTC (rev 10337) +++ trunk/octave-forge/main/statistics/INDEX 2012-04-30 21:50:12 UTC (rev 10338) @@ -4,30 +4,31 @@ betastat binostat chi2stat + cl_multinom copulacdf copulapdf expstat fstat + gamlike gamstat geostat hygestat + jsucdf + jsupdf lognstat mvnpdf mvnrnd mvncdf + mnrnd + mvtcdf + nbinstat normalise_distribution - vmpdf vmrnd - mvtcdf normstat - nbinstat poisstat + random raylcdf raylinv raylpdf raylrnd raylstat tstat unidstat unifstat + vmpdf vmrnd wblstat - gamlike - jsucdf - jsupdf - random - cl_multinom Descriptive statistics nansum nanmax Modified: trunk/octave-forge/main/statistics/NEWS =================================================================== --- trunk/octave-forge/main/statistics/NEWS 2012-04-30 17:13:19 UTC (rev 10337) +++ trunk/octave-forge/main/statistics/NEWS 2012-04-30 21:50:12 UTC (rev 10338) @@ -1,6 +1,10 @@ Summary of important user-visible changes for statistics 1.1.2: ------------------------------------------------------------------- + ** The following functions are new in 1.1.2: + + mnrnd + ** The package is now dependent on the io package (version 1.0.18 or later) since the functions that it depended of from miscellaneous package have been moved to io. Added: trunk/octave-forge/main/statistics/inst/mnrnd.m =================================================================== --- trunk/octave-forge/main/statistics/inst/mnrnd.m (rev 0) +++ trunk/octave-forge/main/statistics/inst/mnrnd.m 2012-04-30 21:50:12 UTC (rev 10338) @@ -0,0 +1,182 @@ +## Copyright (C) 2012 Arno Onken +## +## 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. If not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## @deftypefn {Function File} {@var{x} =} mnrnd (@var{n}, @var{p}) +## @deftypefnx {Function File} {@var{x} =} mnrnd (@var{n}, @var{p}, @var{s}) +## Generate random samples from the multinomial distribution. +## +## @subheading Arguments +## +## @itemize @bullet +## @item +## @var{n} is the first parameter of the multinomial distribution. @var{n} can +## be scalar or a vector containing the number of trials of each multinomial +## sample. The elements of @var{n} must be non-negative integers. +## +## @item +## @var{n} is the second parameter of the multinomial distribution. @var{p} can +## be a vector with the probabilities of the categories or a matrix with each +## row containing the probabilities of a multinomial sample. If @var{p} has +## more than one row and @var{n} is non-scalar, then the number of rows of +## @var{p} must match the number of elements of @var{n}. +## +## @item +## @var{s} is the number of multinomial samples to be generated. @var{s} must +## be a non-negative integer. If @var{s} is specified, then @var{n} must be +## scalar and @var{p} must be a vector. +## +## @subheading Return values +## +## @itemize @bullet +## @item +## @var{x} is a matrix of random samples from the multinomial distribution with +## corresponding parameters @var{n} and @var{p}. Each row corresponds to one +## multinomial sample. The number of columns, therefore, corresponds to the +## number of columns of @var{p}. If @var{s} is not specified, then the number +## of rows of @var{x} is the maximum of the number of elements of @var{n} and +## the number of rows of @var{p}. If a row of @var{p} does not sum to @code{1}, +## then the corresponding row of @var{x} will contain only @code{NaN} values. +## @end itemize +## +## @subheading Examples +## +## @example +## @group +## n = 10; +## p = [0.2 0.5 0.3]; +## x = mnrnd (n, p); +## @end group +## +## @group +## n = 10 * ones (3, 1); +## p = [0.2 0.5 0.3]; +## x = mnrnd (n, p); +## @end group +## +## @group +## n = (1:2)'; +## p = [0.2 0.5 0.3; 0.1 0.1 0.8]; +## x = mnrnd (n, p); +## @end group +## @end example +## +## @subheading References +## +## @enumerate +## @item +## Wendy L. Martinez and Angel R. Martinez. @cite{Computational Statistics +## Handbook with MATLAB}. Appendix E, pages 547-557, Chapman & Hall/CRC, 2001. +## +## @item +## Athanasios Papoulis. @cite{Probability, Random Variables, and Stochastic +## Processes}. pages 104 and 148, McGraw-Hill, New York, second edition, 1984. +## @end enumerate +## @end deftypefn + +## Author: Arno Onken <as...@as...> +## Description: Random samples from the multinomial distribution + +function x = mnrnd (n, p, s) + + # Check arguments + if (nargin == 3) + if (! isscalar (n) || n < 0 || round (n) != n) + error ("mnrnd: n must be a non-negative integer"); + endif + if (! isvector (p) || any (p < 0 | p > 1)) + error ("mnrnd: p must be a vector of probabilities"); + endif + if (! isscalar (s) || s < 0 || round (s) != s) + error ("mnrnd: s must be a non-negative integer"); + endif + elseif (nargin == 2) + if (isvector (p) && size (p, 1) > 1) + p = p'; + endif + if (! isvector (n) || any (n < 0 | round (n) != n) || size (n, 2) > 1) + error ("mnrnd: n must be a non-negative integer column vector"); + endif + if (! ismatrix (p) || isempty (p) || any (p < 0 | p > 1)) + error ("mnrnd: p must be a non-empty matrix with rows of probabilities"); + endif + if (! isscalar (n) && size (p, 1) > 1 && length (n) != size (p, 1)) + error ("mnrnd: the length of n must match the number of rows of p"); + endif + else + print_usage (); + endif + + # Adjust input sizes + if (nargin == 3) + n = n * ones (s, 1); + p = repmat (p(:)', s, 1); + elseif (nargin == 2) + if (isscalar (n) && size (p, 1) > 1) + n = n * ones (size (p, 1), 1); + elseif (size (p, 1) == 1) + p = repmat (p, length (n), 1); + endif + endif + sz = size (p); + + # Upper bounds of categories + ub = cumsum (p, 2); + # Lower bounds of categories + lb = [zeros(sz(1), 1) ub(:, 1:(end-1))]; + + # Draw multinomial samples + x = zeros (sz); + for i = 1:sz(1) + # Check if the probabilities sum to 1 + if (ub(i, end) == 1) + # Draw uniform random numbers + r = repmat (rand (n(i), 1), 1, sz(2)); + # Compare the random numbers of r to the cumulated probabilities of p and + # count the number of samples for each category + x(i, :) = sum (r <= repmat (ub(i, :), n(i), 1) & r > repmat (lb(i, :), n(i), 1), 1); + else + x(i, :) = NaN; + endif + end + +endfunction + +%!test +%! n = 10; +%! p = [0.2 0.5 0.3]; +%! x = mnrnd (n, p); +%! assert (size (x), size (p)); +%! assert (all (x >= 0)); +%! assert (all (round (x) == x)); +%! assert (sum (x) == n); + +%!test +%! n = 10 * ones (3, 1); +%! p = [0.2 0.5 0.3]; +%! x = mnrnd (n, p); +%! assert (size (x), [length(n) length(p)]); +%! assert (all (x >= 0)); +%! assert (all (round (x) == x)); +%! assert (all (sum (x, 2) == n)); + +%!test +%! n = (1:2)'; +%! p = [0.2 0.5 0.3; 0.1 0.1 0.8]; +%! x = mnrnd (n, p); +%! assert (size (x), size (p)); +%! assert (all (x >= 0)); +%! assert (all (round (x) == x)); +%! assert (all (sum (x, 2) == n)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <par...@us...> - 2012-04-30 17:13:25
|
Revision: 10337 http://octave.svn.sourceforge.net/octave/?rev=10337&view=rev Author: paramaniac Date: 2012-04-30 17:13:19 +0000 (Mon, 30 Apr 2012) Log Message: ----------- control-devel: fix arx function partially, error term needs still some attention Modified Paths: -------------- trunk/octave-forge/extra/control-devel/inst/arx.m Modified: trunk/octave-forge/extra/control-devel/inst/arx.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/arx.m 2012-04-30 16:51:51 UTC (rev 10336) +++ trunk/octave-forge/extra/control-devel/inst/arx.m 2012-04-30 17:13:19 UTC (rev 10337) @@ -23,14 +23,15 @@ U = dat.u{1}; Ts = dat.tsam{1}; - PhiY = toeplitz (Y(1:end-1, :), zeros (1, na)); - PhiU = toeplitz (U(1:end-1, :), zeros (1, nb)); - Phi = [-PhiY, PhiU] + ## avoid warning: toeplitz: column wins anti-diagonal conflict + PhiY = toeplitz (Y(1:end-1, :), [Y(1, :); zeros(na-1, 1)]); + PhiU = toeplitz (U(1:end-1, :), [U(1, :); zeros(nb-1, 1)]); + Phi = [-PhiY, PhiU]; Theta = Phi \ Y(2:end, :); - A = [1; Theta(1:na)]; % ??? - B = Theta(na+1:end); + A = [1; Theta(1:na)]; # a0 = 1, a1 = Theta(1), an = Theta(n) + B = Theta(na+1:end); # b0 = 0 (leading zeros are removed by tf, no need to add one) sys = tf ({B, 1}, {A, A}, Ts); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <par...@us...> - 2012-04-30 16:51:57
|
Revision: 10336 http://octave.svn.sourceforge.net/octave/?rev=10336&view=rev Author: paramaniac Date: 2012-04-30 16:51:51 +0000 (Mon, 30 Apr 2012) Log Message: ----------- control-devel: work on arx function Modified Paths: -------------- trunk/octave-forge/extra/control-devel/inst/arx.m Added Paths: ----------- trunk/octave-forge/extra/control-devel/inst/test_arx.m Modified: trunk/octave-forge/extra/control-devel/inst/arx.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/arx.m 2012-04-30 15:57:22 UTC (rev 10335) +++ trunk/octave-forge/extra/control-devel/inst/arx.m 2012-04-30 16:51:51 UTC (rev 10336) @@ -21,16 +21,17 @@ Y = dat.y{1}; U = dat.u{1}; + Ts = dat.tsam{1}; + + PhiY = toeplitz (Y(1:end-1, :), zeros (1, na)); + PhiU = toeplitz (U(1:end-1, :), zeros (1, nb)); + Phi = [-PhiY, PhiU] - PhiY = toeplitz ([0; Y(1:end-1, :)], zeros (1, na)); - PhiU = toeplitz ([0; U(1:end-1, :)], zeros (1, nb)); - Phi = [PhiY, PhiU]; + Theta = Phi \ Y(2:end, :); - Theta = Phi \ Y; + A = [1; Theta(1:na)]; % ??? + B = Theta(na+1:end); - A = Theta(1:n); - B = Theta(n+1:end); - - sys = tf ({B, 1}, {A, A}, dat.tsam); + sys = tf ({B, 1}, {A, A}, Ts); endfunction \ No newline at end of file Added: trunk/octave-forge/extra/control-devel/inst/test_arx.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/test_arx.m (rev 0) +++ trunk/octave-forge/extra/control-devel/inst/test_arx.m 2012-04-30 16:51:51 UTC (rev 10336) @@ -0,0 +1,10 @@ +u = [ 0; 0.5; 1; 1; 1; 1; 1 ]; +y = [ 0; 0; 0.25; 0.62; 0.81; 0.90; 0.95 ]; + +dat = iddata (y, u) + +sys = arx (dat, 1, 1) + + +ysim = lsim (sys(1,1), u); + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <par...@us...> - 2012-04-30 15:57:28
|
Revision: 10335 http://octave.svn.sourceforge.net/octave/?rev=10335&view=rev Author: paramaniac Date: 2012-04-30 15:57:22 +0000 (Mon, 30 Apr 2012) Log Message: ----------- control-devel: add arx function Added Paths: ----------- trunk/octave-forge/extra/control-devel/inst/arx.m Added: trunk/octave-forge/extra/control-devel/inst/arx.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/arx.m (rev 0) +++ trunk/octave-forge/extra/control-devel/inst/arx.m 2012-04-30 15:57:22 UTC (rev 10335) @@ -0,0 +1,36 @@ +## Author: Lukas Reichlin <luk...@gm...> +## Created: April 2012 +## Version: 0.1 + +function sys = arx (dat, na, nb) + + if (nargin != 3) + print_usage (); + endif + + if (! isa (dat, "iddata")) + error ("arx: "); + endif + + if (! is_real_scalar (na, nb)) + error ("arx: "); + ## Test for integers + endif + + ## TODO: handle MIMO and multi-experiment data + + Y = dat.y{1}; + U = dat.u{1}; + + PhiY = toeplitz ([0; Y(1:end-1, :)], zeros (1, na)); + PhiU = toeplitz ([0; U(1:end-1, :)], zeros (1, nb)); + Phi = [PhiY, PhiU]; + + Theta = Phi \ Y; + + A = Theta(1:n); + B = Theta(n+1:end); + + sys = tf ({B, 1}, {A, A}, dat.tsam); + +endfunction \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mtm...@us...> - 2012-04-29 03:57:09
|
Revision: 10334 http://octave.svn.sourceforge.net/octave/?rev=10334&view=rev Author: mtmiller Date: 2012-04-29 03:57:02 +0000 (Sun, 29 Apr 2012) Log Message: ----------- comm: fix and clean up bi2de, de2bi, and oct2dec * fix de2bi matlab compatibility * fix oct2dec to fail with an error on invalid input instead of returning NaN * improve argument error checking and reporting * add test suites * clean up indenting and style Modified Paths: -------------- trunk/octave-forge/main/comm/doc/comms.txi trunk/octave-forge/main/comm/inst/bi2de.m trunk/octave-forge/main/comm/inst/de2bi.m trunk/octave-forge/main/comm/inst/oct2dec.m Modified: trunk/octave-forge/main/comm/doc/comms.txi =================================================================== --- trunk/octave-forge/main/comm/doc/comms.txi 2012-04-28 08:56:56 UTC (rev 10333) +++ trunk/octave-forge/main/comm/doc/comms.txi 2012-04-29 03:57:02 UTC (rev 10334) @@ -1497,7 +1497,7 @@ @example octave:1> a = minpol(gf(14,5)); -octave:2> b = de2bi(a.x,"left-msb"); +octave:2> b = de2bi(a.x,[],"left-msb"); @end example converts the polynomial form of the minimum polynomial of 14 in GF(2^5) into Modified: trunk/octave-forge/main/comm/inst/bi2de.m =================================================================== --- trunk/octave-forge/main/comm/inst/bi2de.m 2012-04-28 08:56:56 UTC (rev 10333) +++ trunk/octave-forge/main/comm/inst/bi2de.m 2012-04-29 03:57:02 UTC (rev 10334) @@ -15,6 +15,7 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {@var{d} = } bi2de (@var{b}) +## @deftypefnx {Function File} {@var{d} = } bi2de (@var{b},@var{f}) ## @deftypefnx {Function File} {@var{d} = } bi2de (@var{b},@var{p}) ## @deftypefnx {Function File} {@var{d} = } bi2de (@var{b},@var{p},@var{f}) ## @@ -29,45 +30,41 @@ ## The variable @var{f} defines whether the first or last element of @var{b} ## is considered to be the most-significant. Valid values of @var{f} are ## 'right-msb' or 'left-msb'. By default @var{f} is 'right-msb'. +## +## @seealso{de2bi} ## @end deftypefn -## @seealso{de2bi} -## 2001-02-02 -## initial release -## 2003-02-02 -## add orientation of b and help in texinfo - function d = bi2de (b, p, f) switch (nargin) case 1, p = 2; f = 'right-msb'; - case 2, - if (ischar(p)) + case 2, + if (ischar (p)) f = p; p = 2; else f = 'right-msb'; endif - case 3, - if (ischar(p)) + case 3, + if (ischar (p)) tmp = f; f = p; p = tmp; endif - otherwise - error ("usage: d = bi2de (b, [p])"); + otherwise + print_usage (); endswitch - if ( any (b (:) < 0) || any (b (:) > p - 1) ) - error ("bi2de: d must only contain value in [0, p-1]"); + if ( any (b(:) < 0) || any (b(:) != floor (b(:))) || any (b(:) > p - 1) ) + error ("bi2de: d must only contain integers in the range [0, p-1]"); endif - if (strcmp(f,'left-msb')) + if (strcmp (f, 'left-msb')) b = b(:,size(b,2):-1:1); - elseif (!strcmp(f,'right-msb')) - error("bi2de: unrecognized flag"); + elseif (!strcmp (f, 'right-msb')) + error ("bi2de: unrecognized flag"); endif if (length (b) == 0) @@ -76,4 +73,24 @@ d = b * ( p .^ [ 0 : (columns(b)-1) ]' ); endif -endfunction; +endfunction + +%!shared x +%! x = randi ([0 1], 100, 16); +%!assert (bi2de (0), 0) +%!assert (bi2de (1), 1) +%!assert (bi2de (ones (1, 8)), 255) +%!assert (bi2de ([7 7 7 7], 8), 4095) +%!assert (size (bi2de (x)), [100 1]) +%!assert (bi2de (x, "right-msb"), bi2de (x)) +%!assert (bi2de (x, "left-msb"), bi2de (fliplr (x))) + +%% Test input validation +%!error bi2de () +%!error bi2de (1, 2, 3, 4) +%!error bi2de (1, 2, 3) +%!error bi2de (1, 2, "invalid") +%!error bi2de (0.1) +%!error bi2de (-1) +%!error bi2de (2) +%!error bi2de (7, 6) Modified: trunk/octave-forge/main/comm/inst/de2bi.m =================================================================== --- trunk/octave-forge/main/comm/inst/de2bi.m 2012-04-28 08:56:56 UTC (rev 10333) +++ trunk/octave-forge/main/comm/inst/de2bi.m 2012-04-29 03:57:02 UTC (rev 10334) @@ -26,7 +26,7 @@ ## of elements of @var{d}. If @var{n} is defined then the returned matrix ## will have @var{n} columns. This number of columns can be either larger ## than the minimum needed and zeros will be added to the msb of the -## binary representation or smaller than the minimum in which case the +## binary representation or smaller than the minimum in which case the ## least-significant part of the element is returned. ## ## If @var{p} is defined then it is used as the base for the decomposition @@ -36,67 +36,72 @@ ## The variable @var{f} defines whether the first or last element of @var{b} ## is considered to be the most-significant. Valid values of @var{f} are ## 'right-msb' or 'left-msb'. By default @var{f} is 'right-msb'. +## +## @seealso{bi2de} ## @end deftypefn -## @seealso{bi2de} -## 2001-02-02 -## initial release -## 2003-02-02 -## add orientation of b and help in texinfo +function b = de2bi (d, n, p, f) -function b = de2bi(d, n, p, f) - if (nargin == 1) p = 2; n = floor ( log (max (max (d), 1)) ./ log (p) ) + 1; f = 'right-msb'; elseif (nargin == 2) p = 2; - if (ischar(n)) - f = n; - n = floor ( log (max (max (d), 1)) ./ log (p) ) + 1; - else - f = 'right-msb'; - endif + f = 'right-msb'; elseif (nargin == 3) - if (ischar(n)) - f = n; - n = p - p = 2; - elseif (ischar(p)) + if (ischar (p)) f = p; p = 2; else f = 'right-msb'; - endif - elseif (nargin == 3) - if (ischar(n)) - tmp = f - f = n; - n = p - p = tmp; - elseif (ischar(p)) + endif + elseif (nargin == 4) + if (ischar (p)) tmp = f; f = p; p = tmp; - endif + endif else - error ("usage: b = de2bi (d [, n [, p]])"); + print_usage (); endif d = d(:); if ( any (d < 0) || any (d != floor (d)) ) - error ("de2bi: only handles non-negative integers"); + error ("de2bi: d must only contain non-negative integers"); endif + if (isempty (n)) + n = floor ( log (max (max (d), 1)) ./ log (p) ) + 1; + endif + power = ones (length (d), 1) * (p .^ [0 : n-1] ); d = d * ones (1, n); b = floor (rem (d, p*power) ./ power); - if (strcmp(f,'left-msb')) + if (strcmp (f, 'left-msb')) b = b(:,columns(b):-1:1); - elseif (!strcmp(f,'right-msb')) - error("de2bi: unrecognized flag"); + elseif (!strcmp (f, 'right-msb')) + error ("de2bi: unrecognized flag"); endif - + endfunction + +%!shared x +%! x = randi ([0 2^16-1], 100, 1); +%!assert (de2bi (0), 0) +%!assert (de2bi (1), 1) +%!assert (de2bi (255), ones (1, 8)) +%!assert (de2bi (255, [], 256), 255) +%!assert (de2bi (1023, 8, 8), [7 7 7 1 0 0 0 0]) +%!assert (size (de2bi (x, 16)), [100 16]) +%!assert (de2bi (x, 16, "right-msb"), de2bi (x, 16)) +%!assert (de2bi (x, 16, "left-msb"), fliplr (de2bi (x, 16))) + +%% Test input validation +%!error de2bi () +%!error de2bi (1, 2, 3, 4, 5) +%!error de2bi (1, 2, 3, 4) +%!error de2bi (1, 2, 3, "invalid") +%!error de2bi (0.1) +%!error de2bi (-1) Modified: trunk/octave-forge/main/comm/inst/oct2dec.m =================================================================== --- trunk/octave-forge/main/comm/inst/oct2dec.m 2012-04-28 08:56:56 UTC (rev 10333) +++ trunk/octave-forge/main/comm/inst/oct2dec.m 2012-04-29 03:57:02 UTC (rev 10334) @@ -14,21 +14,48 @@ ## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} @var{d} = oct2dec(@var{c}) +## @deftypefn {Function File} @var{d} = oct2dec (@var{c}) +## ## Convert octal to decimal values. -## @seealso{base2dec,bin2dec,dec2bi} +## +## Each element of the octal matrix @var{c} is converted to a decimal value. +## +## @seealso{base2dec,bin2dec,dec2bin} ## @end deftypefn -function d = oct2dec(c) - if (nargin != 1) - usage ("d = oct2dec(c)"); - endif - if(any(c(:) < 0) || any(c(:) ~= floor(c(:)))) - error('c must be an octal matrix'); - exit - end - l = size(c,2); - for k = 1:l - str = num2str(c(:,k)); - d(:,k) = base2dec(str,8); - end +function d = oct2dec (c) + + if (nargin != 1) + print_usage (); + endif + + # Check for negative or non-integer values + if (any (c(:) < 0) || any (c(:) != floor (c(:)))) + error ("oct2dec: c must be an octal matrix"); + endif + + d = zeros (size (c)); + l = size (c, 2); + for k = 1:l + str = num2str (c(:,k)); + d(:,k) = base2dec (str, 8); + if (any (isnan (d(:,k)))) + error ("oct2dec: c must be an octal matrix"); + endif + endfor + +endfunction + +%!shared x,y +%! x = reshape ([0:79], 10, 8)(1:8,:); +%! y = reshape ([0:63], 8, 8); +%!assert (oct2dec (0), 0) +%!assert (oct2dec (77777777), 2^24 - 1) +%!assert (oct2dec (x), y) + +%% Test input validation +%!error oct2dec () +%!error oct2dec (0, 0) +%!error <octal matrix> oct2dec (0.1) +%!error <octal matrix> oct2dec (-1) +%!error <octal matrix> oct2dec (8) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <par...@us...> - 2012-04-28 08:57:02
|
Revision: 10333 http://octave.svn.sourceforge.net/octave/?rev=10333&view=rev Author: paramaniac Date: 2012-04-28 08:56:56 +0000 (Sat, 28 Apr 2012) Log Message: ----------- control-devel: minor changes for debugging Modified Paths: -------------- trunk/octave-forge/extra/control-devel/devel/Destillation.m trunk/octave-forge/extra/control-devel/devel/ident.m trunk/octave-forge/extra/control-devel/src/slident.cc Modified: trunk/octave-forge/extra/control-devel/devel/Destillation.m =================================================================== --- trunk/octave-forge/extra/control-devel/devel/Destillation.m 2012-04-27 14:16:16 UTC (rev 10332) +++ trunk/octave-forge/extra/control-devel/devel/Destillation.m 2012-04-28 08:56:56 UTC (rev 10333) @@ -50,6 +50,8 @@ Y_dest_n30=Y(:,10:12); %} +clear all, close all, clc + load destill.dat U=destill(:,1:20); Y=destill(:,21:32); Modified: trunk/octave-forge/extra/control-devel/devel/ident.m =================================================================== --- trunk/octave-forge/extra/control-devel/devel/ident.m 2012-04-27 14:16:16 UTC (rev 10332) +++ trunk/octave-forge/extra/control-devel/devel/ident.m 2012-04-28 08:56:56 UTC (rev 10333) @@ -3,8 +3,8 @@ %nobr = 15; - meth = 2; - alg = 0; + meth = 2; % 2 % geht: meth/alg 1/1, + alg = 0; % 0 % geht nicht: meth/alg 0/1 jobd = 1; batch = 3; conct = 1; Modified: trunk/octave-forge/extra/control-devel/src/slident.cc =================================================================== --- trunk/octave-forge/extra/control-devel/src/slident.cc 2012-04-27 14:16:16 UTC (rev 10332) +++ trunk/octave-forge/extra/control-devel/src/slident.cc 2012-04-28 08:56:56 UTC (rev 10333) @@ -328,6 +328,7 @@ // warning ("==================== ldwork before: %d =====================", ldwork); // ldwork = (ns+2)*(2*(m+l)*nobr); ldwork = max (ldwork, (ns+2)*(2*(m+l)*nobr)); +// ldwork *= 3; // warning ("==================== ldwork after: %d =====================", ldwork); @@ -413,7 +414,10 @@ if (nuser > 0) { if (nuser < nobr) + { n = nuser; + // warning ("ident: nuser (%d) < nobr (%d), n = nuser", nuser, nobr); + } else error ("ident: 'nuser' invalid"); } @@ -430,6 +434,9 @@ int nsmpl = nsmp; + if (nsmpl < 2*(m+l)*nobr) + error ("slident: nsmpl (%d) < 2*(m+l)*nobr (%d)", nsmpl, nobr); + // arguments out int lda = max (1, n); int ldc = max (1, l); @@ -463,7 +470,7 @@ int ldw1; int ldw2; int ldw3; - +/* if (meth == 'M') { int ldw1a = max (2*(l*nobr-l)*n+2*n, (l*nobr-l)*n+n*n+7*n); @@ -507,9 +514,57 @@ ldw2 = l*nobr*n+m*nobr*(n+l)*(m*(n+l)+1)+ max ((n+l)*(n+l), 4*m*(n+l)+1); } +*/ + + int ldw1ax = max (2*(l*nobr-l)*n+2*n, (l*nobr-l)*n+n*n+7*n); + int ldw1bx = max (2*(l*nobr-l)*n+n*n+7*n, + (l*nobr-l)*n+n+6*m*nobr, + (l*nobr-l)*n+n+max (l+m*nobr, l*nobr + max (3*l*nobr+1, m))); + int ldw1x = max (ldw1ax, ldw1bx); + int aw; + + if (m == 0 || job == 'C') + aw = n + n*n; + else + aw = 0; + + int ldw2x = l*nobr*n + max ((l*nobr-l)*n+aw+2*n+max(5*n,(2*m+l)*nobr+l), 4*(m*nobr+n)+1, m*nobr+2*n+l ); + + + + int ldw1y = l*nobr*n + max ((l*nobr-l)*n+2*n+(2*m+l)*nobr+l, + 2*(l*nobr-l)*n+n*n+8*n, + n+4*(m*nobr+n)+1, + m*nobr+3*n+l); + int ldw2y; + if (m == 0 || job == 'C') + int ldw2y = 0; + else + int ldw2y = l*nobr*n+m*nobr*(n+l)*(m*(n+l)+1)+ max ((n+l)*(n+l), 4*m*(n+l)+1); + + + int ldw1az = max (2*(l*nobr-l)*n+2*n, (l*nobr-l)*n+n*n+7*n); + int ldw1bz = l*nobr*n + max ((l*nobr-l)*n+2*n+(2*m+l)*nobr+l, + 2*(l*nobr-l)*n+n*n+8*n, + n+4*(m*nobr+n)+1, + m*nobr+3*n+l); + + int ldw1z = max (ldw1az, ldw1bz); + + int ldw2z = l*nobr*n+m*nobr*(n+l)*(m*(n+l)+1)+ max ((n+l)*(n+l), 4*m*(n+l)+1); + + + ldw1 = max (ldw1x, ldw1y, ldw1z); + ldw2 = max (ldw2x, ldw2y, ldw2z); + + + ldw3 = max(4*n*n + 2*n*l + l*l + max (3*l, n*l), 14*n*n + 12*n + 5); ldwork_b = max (ldw1, ldw2, ldw3); + + // + ldwork_b *= 3; OCTAVE_LOCAL_BUFFER (int, iwork_b, liwork_b); OCTAVE_LOCAL_BUFFER (double, dwork_b, ldwork_b); @@ -690,6 +745,7 @@ retval(7) = k; retval(8) = x0; + //retval(8) = ColumnVector (n); //retval(0) = octave_value (n); //retval(1) = r; //retval(2) = sv; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-27 14:16:24
|
Revision: 10332 http://octave.svn.sourceforge.net/octave/?rev=10332&view=rev Author: carandraug Date: 2012-04-27 14:16:16 +0000 (Fri, 27 Apr 2012) Log Message: ----------- comm: Makefile use defined MKOCTFILE. Patch by Mike Miller <mtm...@ie...> Modified Paths: -------------- trunk/octave-forge/main/comm/src/Makefile Modified: trunk/octave-forge/main/comm/src/Makefile =================================================================== --- trunk/octave-forge/main/comm/src/Makefile 2012-04-26 14:52:03 UTC (rev 10331) +++ trunk/octave-forge/main/comm/src/Makefile 2012-04-27 14:16:16 UTC (rev 10332) @@ -1,6 +1,6 @@ sinclude Makeconf -HDF5_LIBS := $(shell grep "\#define OCTAVE_CONF_HDF5_LIBS" $(shell mkoctfile -p OCTINCLUDEDIR)/oct-conf.h | sed "s/^.*LIBS //" ) +HDF5_LIBS := $(shell grep "\#define OCTAVE_CONF_HDF5_LIBS" $(shell $(MKOCTFILE) -p OCTINCLUDEDIR)/oct-conf.h | sed "s/^.*LIBS //" ) GALOISTARGET = gf.oct GALOISSOURCES = galois.cc galois-def.cc galoisfield.cc gf.cc \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-26 14:52:14
|
Revision: 10331 http://octave.svn.sourceforge.net/octave/?rev=10331&view=rev Author: carandraug Date: 2012-04-26 14:52:03 +0000 (Thu, 26 Apr 2012) Log Message: ----------- bugfix-3.0.5: removing obsolete package Removed Paths: ------------- trunk/octave-forge/extra/bugfix-3.0.5/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-26 01:10:53
|
Revision: 10330 http://octave.svn.sourceforge.net/octave/?rev=10330&view=rev Author: carandraug Date: 2012-04-26 01:10:47 +0000 (Thu, 26 Apr 2012) Log Message: ----------- textable: bugfix on setting the defaults Modified Paths: -------------- trunk/octave-forge/main/miscellaneous/inst/textable.m Modified: trunk/octave-forge/main/miscellaneous/inst/textable.m =================================================================== --- trunk/octave-forge/main/miscellaneous/inst/textable.m 2012-04-25 21:47:42 UTC (rev 10329) +++ trunk/octave-forge/main/miscellaneous/inst/textable.m 2012-04-26 01:10:47 UTC (rev 10330) @@ -94,10 +94,10 @@ end end - if exist ('matrixformat') + if matrixformat == 1 clines = 0; rlines = 0; - alignment = 0; + alignment = "c"; else matrixformat = 0; endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-25 21:47:48
|
Revision: 10329 http://octave.svn.sourceforge.net/octave/?rev=10329&view=rev Author: carandraug Date: 2012-04-25 21:47:42 +0000 (Wed, 25 Apr 2012) Log Message: ----------- physicalconstants: finished cleaning package (now empty) Removed Paths: ------------- trunk/octave-forge/main/physical-constants/INDEX trunk/octave-forge/main/physical-constants/test-consts.m Deleted: trunk/octave-forge/main/physical-constants/INDEX =================================================================== --- trunk/octave-forge/main/physical-constants/INDEX 2012-04-25 21:44:08 UTC (rev 10328) +++ trunk/octave-forge/main/physical-constants/INDEX 2012-04-25 21:47:42 UTC (rev 10329) @@ -1,3 +0,0 @@ -PhysicalConstants >> Physical Constants -Physical Constants - physical_constant Deleted: trunk/octave-forge/main/physical-constants/test-consts.m =================================================================== --- trunk/octave-forge/main/physical-constants/test-consts.m 2012-04-25 21:44:08 UTC (rev 10328) +++ trunk/octave-forge/main/physical-constants/test-consts.m 2012-04-25 21:47:42 UTC (rev 10329) @@ -1,309 +0,0 @@ -physical_constant("SPEED_OF_LIGHT_IN_VACUUM") -physical_constant("MAGN_CONSTANT") -physical_constant("ELECTRIC_CONSTANT") -physical_constant("CHARACTERISTIC_IMPEDANCE_OF_VACUUM") -physical_constant("NEWTONIAN_CONSTANT_OF_GRAVITATION") -physical_constant("NEWTONIAN_CONSTANT_OF_GRAVITATION_BY_H_BAR_C") -physical_constant("PLANCK_CONSTANT") -physical_constant("PLANCK_CONSTANT_IN_EV_S") -physical_constant("PLANCK_CONSTANT_BY_2_PI_TIMES_C_IN_MEV_FM") -physical_constant("PLANCK_CONSTANT_BY_2_PI") -physical_constant("PLANCK_CONSTANT_BY_2_PI_IN_EV_S") -physical_constant("PLANCK_MASS") -physical_constant("PLANCK_TEMPERATURE") -physical_constant("PLANCK_LENGTH") -physical_constant("PLANCK_TIME") -physical_constant("ELEMENTARY_CHARGE") -physical_constant("ELEMENTARY_CHARGE_BY_H") -physical_constant("MAGN_FLUX_QUANTUM") -physical_constant("CONDUCTANCE_QUANTUM") -physical_constant("INVERSE_OF_CONDUCTANCE_QUANTUM") -physical_constant("JOSEPHSON_CONSTANT") -physical_constant("VON_KLITZING_CONSTANT") -physical_constant("BOHR_MAGNETON") -physical_constant("BOHR_MAGNETON_IN_EV_PER_T") -physical_constant("BOHR_MAGNETON_IN_HZ_PER_T") -physical_constant("BOHR_MAGNETON_IN_INVERSE_METERS_PER_TESLA") -physical_constant("BOHR_MAGNETON_IN_K_PER_T") -physical_constant("NUCLEAR_MAGNETON") -physical_constant("NUCLEAR_MAGNETON_IN_EV_PER_T") -physical_constant("NUCLEAR_MAGNETON_IN_MHZ_PER_T") -physical_constant("NUCLEAR_MAGNETON_IN_INVERSE_METERS_PER_TESLA") -physical_constant("NUCLEAR_MAGNETON_IN_K_PER_T") -physical_constant("FINE_STRUCTURE_CONSTANT") -physical_constant("INVERSE_FINE_STRUCTURE_CONSTANT") -physical_constant("RYDBERG_CONSTANT") -physical_constant("RYDBERG_CONSTANT_TIMES_C_IN_HZ") -physical_constant("RYDBERG_CONSTANT_TIMES_HC_IN_J") -physical_constant("RYDBERG_CONSTANT_TIMES_HC_IN_EV") -physical_constant("BOHR_RADIUS") -physical_constant("HARTREE_ENERGY") -physical_constant("HARTREE_ENERGY_IN_EV") -physical_constant("QUANTUM_OF_CIRCULATION") -physical_constant("QUANTUM_OF_CIRCULATION_TIMES_2") -physical_constant("FERMI_COUPLING_CONSTANT") -physical_constant("WEAK_MIXING_ANGLE") -physical_constant("ELECTRON_MASS") -physical_constant("ELECTRON_MASS_IN_U") -physical_constant("ELECTRON_MASS_ENERGY_EQUIVALENT") -physical_constant("ELECTRON_MASS_ENERGY_EQUIVALENT_IN_MEV") -physical_constant("ELECTRON_MUON_MASS_RATIO") -physical_constant("ELECTRON_TAU_MASS_RATIO") -physical_constant("ELECTRON_PROTON_MASS_RATIO") -physical_constant("ELECTRON_NEUTRON_MASS_RATIO") -physical_constant("ELECTRON_DEUTERON_MASS_RATIO") -physical_constant("ELECTRON_TO_ALPHA_PARTICLE_MASS_RATIO") -physical_constant("ELECTRON_CHARGE_TO_MASS_QUOTIENT") -physical_constant("ELECTRON_MOLAR_MASS") -physical_constant("COMPTON_WAVELENGTH") -physical_constant("COMPTON_WAVELENGTH_BY_2_PI") -physical_constant("CLASSICAL_ELECTRON_RADIUS") -physical_constant("THOMSON_CROSS_SECTION") -physical_constant("ELECTRON_MAGN_MOMENT") -physical_constant("ELECTRON_MAGN_MOMENT_TO_BOHR_MAGNETON_RATIO") -physical_constant("ELECTRON_MAGN_MOMENT_TO_NUCLEAR_MAGNETON_RATIO") -physical_constant("ELECTRON_MAGN_MOMENT_ANOMALY") -physical_constant("ELECTRON_G_FACTOR") -physical_constant("ELECTRON_MUON_MAGN_MOMENT_RATIO") -physical_constant("ELECTRON_PROTON_MAGN_MOMENT_RATIO") -physical_constant("ELECTRON_TO_SHIELDED_PROTON_MAGN_MOMENT_RATIO") -physical_constant("ELECTRON_NEUTRON_MAGN_MOMENT_RATIO") -physical_constant("ELECTRON_DEUTERON_MAGN_MOMENT_RATIO") -physical_constant("ELECTRON_TO_SHIELDED_HELION_MAGN_MOMENT_RATIO") -physical_constant("ELECTRON_GYROMAGN_RATIO") -physical_constant("ELECTRON_GYROMAGN_RATIO_BY_2_PI") -physical_constant("MUON_MASS") -physical_constant("MUON_MASS_IN_U") -physical_constant("MUON_MASS_ENERGY_EQUIVALENT") -physical_constant("MUON_MASS_ENERGY_EQUIVALENT_IN_MEV") -physical_constant("MUON_ELECTRON_MASS_RATIO") -physical_constant("MUON_TAU_MASS_RATIO") -physical_constant("MUON_PROTON_MASS_RATIO") -physical_constant("MUON_NEUTRON_MASS_RATIO") -physical_constant("MUON_MOLAR_MASS") -physical_constant("MUON_COMPTON_WAVELENGTH") -physical_constant("MUON_COMPTON_WAVELENGTH_BY_2_PI") -physical_constant("MUON_MAGN_MOMENT") -physical_constant("MUON_MAGN_MOMENT_TO_BOHR_MAGNETON_RATIO") -physical_constant("MUON_MAGN_MOMENT_TO_NUCLEAR_MAGNETON_RATIO") -physical_constant("MUON_MAGN_MOMENT_ANOMALY") -physical_constant("MUON_G_FACTOR") -physical_constant("MUON_PROTON_MAGN_MOMENT_RATIO") -physical_constant("TAU_MASS") -physical_constant("TAU_MASS_IN_U") -physical_constant("TAU_MASS_ENERGY_EQUIVALENT") -physical_constant("TAU_MASS_ENERGY_EQUIVALENT_IN_MEV") -physical_constant("TAU_ELECTRON_MASS_RATIO") -physical_constant("TAU_MUON_MASS_RATIO") -physical_constant("TAU_PROTON_MASS_RATIO") -physical_constant("TAU_NEUTRON_MASS_RATIO") -physical_constant("TAU_MOLAR_MASS") -physical_constant("TAU_COMPTON_WAVELENGTH") -physical_constant("TAU_COMPTON_WAVELENGTH_BY_2_PI") -physical_constant("PROTON_MASS") -physical_constant("PROTON_MASS_IN_U") -physical_constant("PROTON_MASS_ENERGY_EQUIVALENT") -physical_constant("PROTON_MASS_ENERGY_EQUIVALENT_IN_MEV") -physical_constant("PROTON_ELECTRON_MASS_RATIO") -physical_constant("PROTON_MUON_MASS_RATIO") -physical_constant("PROTON_TAU_MASS_RATIO") -physical_constant("PROTON_NEUTRON_MASS_RATIO") -physical_constant("PROTON_CHARGE_TO_MASS_QUOTIENT") -physical_constant("PROTON_MOLAR_MASS") -physical_constant("PROTON_COMPTON_WAVELENGTH") -physical_constant("PROTON_COMPTON_WAVELENGTH_BY_2_PI") -physical_constant("PROTON_MAGN_MOMENT") -physical_constant("PROTON_MAGN_MOMENT_TO_BOHR_MAGNETON_RATIO") -physical_constant("PROTON_MAGN_MOMENT_TO_NUCLEAR_MAGNETON_RATIO") -physical_constant("PROTON_G_FACTOR") -physical_constant("PROTON_NEUTRON_MAGN_MOMENT_RATIO") -physical_constant("SHIELDED_PROTON_MAGN_MOMENT") -physical_constant("SHIELDED_PROTON_MAGN_MOMENT_TO_BOHR_MAGNETON_RATIO") -physical_constant("SHIELDED_PROTON_MAGN_MOMENT_TO_NUCLEAR_MAGNETON_RATIO") -physical_constant("PROTON_MAGN_SHIELDING_CORRECTION") -physical_constant("PROTON_GYROMAGN_RATIO") -physical_constant("PROTON_GYROMAGN_RATIO_BY_2_PI") -physical_constant("SHIELDED_PROTON_GYROMAGN_RATIO") -physical_constant("SHIELDED_PROTON_GYROMAGN_RATIO_BY_2_PI") -physical_constant("PROTON_RMS_CHARGE_RADIUS") -physical_constant("NEUTRON_MASS") -physical_constant("NEUTRON_MASS_IN_U") -physical_constant("NEUTRON_MASS_ENERGY_EQUIVALENT") -physical_constant("NEUTRON_MASS_ENERGY_EQUIVALENT_IN_MEV") -physical_constant("NEUTRON_ELECTRON_MASS_RATIO") -physical_constant("NEUTRON_MUON_MASS_RATIO") -physical_constant("NEUTRON_TAU_MASS_RATIO") -physical_constant("NEUTRON_PROTON_MASS_RATIO") -physical_constant("NEUTRON_MOLAR_MASS") -physical_constant("NEUTRON_COMPTON_WAVELENGTH") -physical_constant("NEUTRON_COMPTON_WAVELENGTH_BY_2_PI") -physical_constant("NEUTRON_MAGN_MOMENT") -physical_constant("NEUTRON_MAGN_MOMENT_TO_BOHR_MAGNETON_RATIO") -physical_constant("NEUTRON_MAGN_MOMENT_TO_NUCLEAR_MAGNETON_RATIO") -physical_constant("NEUTRON_G_FACTOR") -physical_constant("NEUTRON_ELECTRON_MAGN_MOMENT_RATIO") -physical_constant("NEUTRON_PROTON_MAGN_MOMENT_RATIO") -physical_constant("NEUTRON_TO_SHIELDED_PROTON_MAGN_MOMENT_RATIO") -physical_constant("NEUTRON_GYROMAGN_RATIO") -physical_constant("NEUTRON_GYROMAGN_RATIO_BY_2_PI") -physical_constant("DEUTERON_MASS") -physical_constant("DEUTERON_MASS_IN_U") -physical_constant("DEUTERON_MASS_ENERGY_EQUIVALENT") -physical_constant("DEUTERON_MASS_ENERGY_EQUIVALENT_IN_MEV") -physical_constant("DEUTERON_ELECTRON_MASS_RATIO") -physical_constant("DEUTERON_PROTON_MASS_RATIO") -physical_constant("DEUTERON_MOLAR_MASS") -physical_constant("DEUTERON_MAGN_MOMENT") -physical_constant("DEUTERON_MAGN_MOMENT_TO_BOHR_MAGNETON_RATIO") -physical_constant("DEUTERON_MAGN_MOMENT_TO_NUCLEAR_MAGNETON_RATIO") -physical_constant("DEUTERON_ELECTRON_MAGN_MOMENT_RATIO") -physical_constant("DEUTERON_PROTON_MAGN_MOMENT_RATIO") -physical_constant("DEUTERON_NEUTRON_MAGN_MOMENT_RATIO") -physical_constant("DEUTERON_RMS_CHARGE_RADIUS") -physical_constant("HELION_MASS") -physical_constant("HELION_MASS_IN_U") -physical_constant("HELION_MASS_ENERGY_EQUIVALENT") -physical_constant("HELION_MASS_ENERGY_EQUIVALENT_IN_MEV") -physical_constant("HELION_ELECTRON_MASS_RATIO") -physical_constant("HELION_PROTON_MASS_RATIO") -physical_constant("HELION_MOLAR_MASS") -physical_constant("SHIELDED_HELION_MAGN_MOMENT") -physical_constant("SHIELDED_HELION_MAGN_MOMENT_TO_BOHR_MAGNETON_RATIO") -physical_constant("SHIELDED_HELION_MAGN_MOMENT_TO_NUCLEAR_MAGNETON_RATIO") -physical_constant("SHIELDED_HELION_TO_PROTON_MAGN_MOMENT_RATIO") -physical_constant("SHIELDED_HELION_TO_SHIELDED_PROTON_MAGN_MOMENT_RATIO") -physical_constant("SHIELDED_HELION_GYROMAGN_RATIO") -physical_constant("SHIELDED_HELION_GYROMAGN_RATIO_BY_2_PI") -physical_constant("ALPHA_PARTICLE_MASS") -physical_constant("ALPHA_PARTICLE_MASS_IN_U") -physical_constant("ALPHA_PARTICLE_MASS_ENERGY_EQUIVALENT") -physical_constant("ALPHA_PARTICLE_MASS_ENERGY_EQUIVALENT_IN_MEV") -physical_constant("ALPHA_PARTICLE_ELECTRON_MASS_RATIO") -physical_constant("ALPHA_PARTICLE_PROTON_MASS_RATIO") -physical_constant("ALPHA_PARTICLE_MOLAR_MASS") -physical_constant("AVOGADRO_CONSTANT") -physical_constant("ATOMIC_MASS_CONSTANT") -physical_constant("ATOMIC_MASS_CONSTANT_ENERGY_EQUIVALENT") -physical_constant("ATOMIC_MASS_CONSTANT_ENERGY_EQUIVALENT_IN_MEV") -physical_constant("FARADAY_CONSTANT") -physical_constant("FARADAY_CONSTANT_FOR_CONVENTIONAL_ELECTRIC_CURRENT") -physical_constant("MOLAR_PLANCK_CONSTANT") -physical_constant("MOLAR_PLANCK_CONSTANT_TIMES_C") -physical_constant("MOLAR_GAS_CONSTANT") -physical_constant("BOLTZMANN_CONSTANT") -physical_constant("BOLTZMANN_CONSTANT_IN_EV_PER_K") -physical_constant("BOLTZMANN_CONSTANT_IN_HZ_PER_K") -physical_constant("BOLTZMANN_CONSTANT_IN_INVERSE_METERS_PER_KELVIN") -physical_constant("MOLAR_VOLUME_OF_IDEAL_GAS") -physical_constant("LOSCHMIDT_CONSTANT") -physical_constant("MOLAR_VOLUME_OF_IDEAL_GAS") -physical_constant("SACKUR_TETRODE_CONSTANT") -physical_constant("SACKUR_TETRODE_CONSTANT") -physical_constant("STEFAN_BOLTZMANN_CONSTANT") -physical_constant("FIRST_RADIATION_CONSTANT") -physical_constant("FIRST_RADIATION_CONSTANT_FOR_SPECTRAL_RADIANCE") -physical_constant("SECOND_RADIATION_CONSTANT") -physical_constant("WIEN_DISPLACEMENT_LAW_CONSTANT") -physical_constant("MOLAR_MASS_OF_CARBON_12") -physical_constant("MOLAR_MASS_CONSTANT") -physical_constant("CONVENTIONAL_VALUE_OF_JOSEPHSON_CONSTANT") -physical_constant("CONVENTIONAL_VALUE_OF_VON_KLITZING_CONSTANT") -physical_constant("STANDARD_ATMOSPHERE") -physical_constant("STANDARD_ACCELERATION_OF_GRAVITY") -physical_constant("CU_X_UNIT") -physical_constant("MO_X_UNIT") -physical_constant("ANGSTROM_STAR") -physical_constant("LATTICE_PARAMETER_OF_SILICON") -physical_constant("LATTICE_SPACING_OF_SILICON") -physical_constant("MOLAR_VOLUME_OF_SILICON") -physical_constant("ELECTRON_VOLT") -physical_constant("UNIFIED_ATOMIC_MASS_UNIT") -physical_constant("NATURAL_UNIT_OF_VELOCITY") -physical_constant("NATURAL_UNIT_OF_ACTION") -physical_constant("NATURAL_UNIT_OF_ACTION_IN_EV_S") -physical_constant("NATURAL_UNIT_OF_MASS") -physical_constant("NATURAL_UNIT_OF_ENERGY") -physical_constant("NATURAL_UNIT_OF_ENERGY_IN_MEV") -physical_constant("NATURAL_UNIT_OF_MOMENTUM") -physical_constant("NATURAL_UNIT_OF_MOMENTUM_IN_MEV_PER_C") -physical_constant("NATURAL_UNIT_OF_LENGTH") -physical_constant("NATURAL_UNIT_OF_TIME") -physical_constant("ATOMIC_UNIT_OF_CHARGE") -physical_constant("ATOMIC_UNIT_OF_MASS") -physical_constant("ATOMIC_UNIT_OF_ACTION") -physical_constant("ATOMIC_UNIT_OF_LENGTH") -physical_constant("ATOMIC_UNIT_OF_ENERGY") -physical_constant("ATOMIC_UNIT_OF_TIME") -physical_constant("ATOMIC_UNIT_OF_FORCE") -physical_constant("ATOMIC_UNIT_OF_VELOCITY") -physical_constant("ATOMIC_UNIT_OF_MOMENTUM") -physical_constant("ATOMIC_UNIT_OF_CURRENT") -physical_constant("ATOMIC_UNIT_OF_CHARGE_DENSITY") -physical_constant("ATOMIC_UNIT_OF_ELECTRIC_POTENTIAL") -physical_constant("ATOMIC_UNIT_OF_ELECTRIC_FIELD") -physical_constant("ATOMIC_UNIT_OF_ELECTRIC_FIELD_GRADIENT") -physical_constant("ATOMIC_UNIT_OF_ELECTRIC_DIPOLE_MOMENT") -physical_constant("ATOMIC_UNIT_OF_ELECTRIC_QUADRUPOLE_MOMENT") -physical_constant("ATOMIC_UNIT_OF_ELECTRIC_POLARIZABLITY") -physical_constant("ATOMIC_UNIT_OF_1ST_HYPERPOLARIZABLITY") -physical_constant("ATOMIC_UNIT_OF_2ND_HYPERPOLARIZABLITY") -physical_constant("ATOMIC_UNIT_OF_MAGN_FLUX_DENSITY") -physical_constant("ATOMIC_UNIT_OF_MAGN_DIPOLE_MOMENT") -physical_constant("ATOMIC_UNIT_OF_MAGNETIZABILITY") -physical_constant("ATOMIC_UNIT_OF_PERMITTIVITY") -physical_constant("JOULE_KILOGRAM") -physical_constant("JOULE_INVERSE_METER") -physical_constant("JOULE_HERTZ") -physical_constant("JOULE_KELVIN") -physical_constant("JOULE_ELECTRON_VOLT") -physical_constant("JOULE_ATOMIC_MASS_UNIT") -physical_constant("JOULE_HARTREE") -physical_constant("KILOGRAM_JOULE") -physical_constant("KILOGRAM_INVERSE_METER") -physical_constant("KILOGRAM_HERTZ") -physical_constant("KILOGRAM_KELVIN") -physical_constant("KILOGRAM_ELECTRON_VOLT") -physical_constant("KILOGRAM_ATOMIC_MASS_UNIT") -physical_constant("KILOGRAM_HARTREE") -physical_constant("INVERSE_METER_JOULE") -physical_constant("INVERSE_METER_KILOGRAM") -physical_constant("INVERSE_METER_HERTZ") -physical_constant("INVERSE_METER_KELVIN") -physical_constant("INVERSE_METER_ELECTRON_VOLT") -physical_constant("INVERSE_METER_ATOMIC_MASS_UNIT") -physical_constant("INVERSE_METER_HARTREE") -physical_constant("HERTZ_JOULE") -physical_constant("HERTZ_KILOGRAM") -physical_constant("HERTZ_INVERSE_METER") -physical_constant("HERTZ_KELVIN") -physical_constant("HERTZ_ELECTRON_VOLT") -physical_constant("HERTZ_ATOMIC_MASS_UNIT") -physical_constant("HERTZ_HARTREE") -physical_constant("KELVIN_JOULE") -physical_constant("KELVIN_KILOGRAM") -physical_constant("KELVIN_INVERSE_METER") -physical_constant("KELVIN_HERTZ") -physical_constant("KELVIN_ELECTRON_VOLT") -physical_constant("KELVIN_ATOMIC_MASS_UNIT") -physical_constant("KELVIN_HARTREE") -physical_constant("ELECTRON_VOLT_JOULE") -physical_constant("ELECTRON_VOLT_KILOGRAM") -physical_constant("ELECTRON_VOLT_INVERSE_METER") -physical_constant("ELECTRON_VOLT_HERTZ") -physical_constant("ELECTRON_VOLT_KELVIN") -physical_constant("ELECTRON_VOLT_ATOMIC_MASS_UNIT") -physical_constant("ELECTRON_VOLT_HARTREE") -physical_constant("ATOMIC_MASS_UNIT_JOULE") -physical_constant("ATOMIC_MASS_UNIT_KILOGRAM") -physical_constant("ATOMIC_MASS_UNIT_INVERSE_METER") -physical_constant("ATOMIC_MASS_UNIT_HERTZ") -physical_constant("ATOMIC_MASS_UNIT_KELVIN") -physical_constant("ATOMIC_MASS_UNIT_ELECTRON_VOLT") -physical_constant("ATOMIC_MASS_UNIT_HARTREE") -physical_constant("HARTREE_JOULE") -physical_constant("HARTREE_KILOGRAM") -physical_constant("HARTREE_INVERSE_METER") -physical_constant("HARTREE_HERTZ") -physical_constant("HARTREE_KELVIN") -physical_constant("HARTREE_ELECTRON_VOLT") -physical_constant("HARTREE_ATOMIC_MASS_UNIT") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-25 21:44:17
|
Revision: 10328 http://octave.svn.sourceforge.net/octave/?rev=10328&view=rev Author: carandraug Date: 2012-04-25 21:44:08 +0000 (Wed, 25 Apr 2012) Log Message: ----------- physical_constant: move function into miscellaneous package Modified Paths: -------------- trunk/octave-forge/main/miscellaneous/NEWS trunk/octave-forge/main/physical-constants/DESCRIPTION Added Paths: ----------- trunk/octave-forge/main/miscellaneous/inst/physical_constant.m trunk/octave-forge/main/miscellaneous/inst/physical_constant.py trunk/octave-forge/main/physical-constants/inst/dummy Removed Paths: ------------- trunk/octave-forge/main/physical-constants/inst/physical_constant.m trunk/octave-forge/main/physical-constants/inst/physical_constant.py Modified: trunk/octave-forge/main/miscellaneous/NEWS =================================================================== --- trunk/octave-forge/main/miscellaneous/NEWS 2012-04-25 21:29:49 UTC (rev 10327) +++ trunk/octave-forge/main/miscellaneous/NEWS 2012-04-25 21:44:08 UTC (rev 10328) @@ -12,7 +12,15 @@ partcnt partint + ** The function `physical_constant' has been imported from the + physicalconstants package. + ** The values returned by `physical_constant' have been adjusted to the + latest (2010) recommended values by CODATA. + + ** The function `physical_constant' has a new API and should also + perform faster. + =============================================================================== miscellaneous-1.1.0 Release Date: 2012-03-24 Release Manager: =============================================================================== Copied: trunk/octave-forge/main/miscellaneous/inst/physical_constant.m (from rev 10326, trunk/octave-forge/main/physical-constants/inst/physical_constant.m) =================================================================== --- trunk/octave-forge/main/miscellaneous/inst/physical_constant.m (rev 0) +++ trunk/octave-forge/main/miscellaneous/inst/physical_constant.m 2012-04-25 21:44:08 UTC (rev 10328) @@ -0,0 +1,2078 @@ +## Copyright (C) 2007 Muthiah Annamalai <mut...@ut...> +## Copyright (C) 2012 Carnë Draug <car...@gm...> +## +## 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; if not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## @deftypefn {Function File} {[@var{names}] =} physical_constant +## @deftypefnx {Function File} {[@var{val}, @var{uncertainty}, @var{unit}] =} physical_constant (@var{name}) +## @deftypefnx {Function File} {[@var{constants}] =} physical_constant ("all") +## Get physical constant @var{arg}. +## +## If no arguments are given, returns a cell array with all possible @var{name}s. +## Alternatively, @var{name} can be `all' in which case @var{val} is a structure +## array with 4 fields (name, value, uncertainty, units). +## +## Since the long list of values needs to be parsed on each call to this function +## it is much more efficient to store the values in a variable rather make multiple +## calls to this function with the same argument +## +## The values are the ones recommended by CODATA. This function was autogenerated +## on Wed Apr 25 22:17:07 2012 from NIST database at @uref{http://physics.nist.gov/constants} +## @end deftypefn + +## DO NOT EDIT THIS FILE +## This function file is generated automatically by physical_constant.py + +function [rval, uncert, unit] = physical_constant (arg) + + persistent unit_data; + if (isempty(unit_data)) + unit_data = get_data; + endif + + if (nargin > 1 || (nargin == 1 && !ischar (arg))) + print_usage; + elseif (nargin == 0) + rval = reshape ({unit_data(:).name}, size (unit_data)); + return + elseif (nargin == 1 && strcmpi (arg, "all")) + rval = unit_data; + return + endif + + val = reshape ({unit_data(:).name}, size (unit_data)); + map = strcmpi (val, arg); + if (any (map)) + val = unit_data(map); + rval = val.value; + uncert = val.uncertainty; + unit = val.units; + else + error ("No constant with name '%s' found", arg) + endif +endfunction + +function unit_data = get_data + unit_data(1).name = "Angstrom star"; + unit_data(1).value = 1.00001495e-10; + unit_data(1).uncertainty = 0.00000090e-10; + unit_data(1).units = "m"; + + unit_data(2).name = "Avogadro constant"; + unit_data(2).value = 6.02214129e23; + unit_data(2).uncertainty = 0.00000027e23; + unit_data(2).units = "mol^-1"; + + unit_data(3).name = "Bohr magneton"; + unit_data(3).value = 927.400968e-26; + unit_data(3).uncertainty = 0.000020e-26; + unit_data(3).units = "J T^-1"; + + unit_data(4).name = "Bohr magneton in Hz/T"; + unit_data(4).value = 13.99624555e9; + unit_data(4).uncertainty = 0.00000031e9; + unit_data(4).units = "Hz T^-1"; + + unit_data(5).name = "Bohr magneton in K/T"; + unit_data(5).value = 0.67171388; + unit_data(5).uncertainty = 0.00000061; + unit_data(5).units = "K T^-1"; + + unit_data(6).name = "Bohr magneton in eV/T"; + unit_data(6).value = 5.7883818066e-5; + unit_data(6).uncertainty = 0.0000000038e-5; + unit_data(6).units = "eV T^-1"; + + unit_data(7).name = "Bohr magneton in inverse meters per tesla"; + unit_data(7).value = 46.6864498; + unit_data(7).uncertainty = 0.0000010; + unit_data(7).units = "m^-1 T^-1"; + + unit_data(8).name = "Bohr radius"; + unit_data(8).value = 0.52917721092e-10; + unit_data(8).uncertainty = 0.00000000017e-10; + unit_data(8).units = "m"; + + unit_data(9).name = "Boltzmann constant"; + unit_data(9).value = 1.3806488e-23; + unit_data(9).uncertainty = 0.0000013e-23; + unit_data(9).units = "J K^-1"; + + unit_data(10).name = "Boltzmann constant in Hz/K"; + unit_data(10).value = 2.0836618e10; + unit_data(10).uncertainty = 0.0000019e10; + unit_data(10).units = "Hz K^-1"; + + unit_data(11).name = "Boltzmann constant in eV/K"; + unit_data(11).value = 8.6173324e-5; + unit_data(11).uncertainty = 0.0000078e-5; + unit_data(11).units = "eV K^-1"; + + unit_data(12).name = "Boltzmann constant in inverse meters per kelvin"; + unit_data(12).value = 69.503476; + unit_data(12).uncertainty = 0.000063; + unit_data(12).units = "m^-1 K^-1"; + + unit_data(13).name = "Compton wavelength"; + unit_data(13).value = 2.4263102389e-12; + unit_data(13).uncertainty = 0.0000000016e-12; + unit_data(13).units = "m"; + + unit_data(14).name = "Compton wavelength over 2 pi"; + unit_data(14).value = 386.15926800e-15; + unit_data(14).uncertainty = 0.00000025e-15; + unit_data(14).units = "m"; + + unit_data(15).name = "Cu x unit"; + unit_data(15).value = 1.00207697e-13; + unit_data(15).uncertainty = 0.00000028e-13; + unit_data(15).units = "m"; + + unit_data(16).name = "Faraday constant"; + unit_data(16).value = 96485.3365; + unit_data(16).uncertainty = 0.0021; + unit_data(16).units = "C mol^-1"; + + unit_data(17).name = "Faraday constant for conventional electric current"; + unit_data(17).value = 96485.3321; + unit_data(17).uncertainty = 0.0043; + unit_data(17).units = "C_90 mol^-1"; + + unit_data(18).name = "Fermi coupling constant"; + unit_data(18).value = 1.166364e-5; + unit_data(18).uncertainty = 0.000005e-5; + unit_data(18).units = "GeV^-2"; + + unit_data(19).name = "Hartree energy"; + unit_data(19).value = 4.35974434e-18; + unit_data(19).uncertainty = 0.00000019e-18; + unit_data(19).units = "J"; + + unit_data(20).name = "Hartree energy in eV"; + unit_data(20).value = 27.21138505; + unit_data(20).uncertainty = 0.00000060; + unit_data(20).units = "eV"; + + unit_data(21).name = "Josephson constant"; + unit_data(21).value = 483597.870e9; + unit_data(21).uncertainty = 0.011e9; + unit_data(21).units = "Hz V^-1"; + + unit_data(22).name = "Loschmidt constant (273.15 K, 100 kPa)"; + unit_data(22).value = 2.6516462e25; + unit_data(22).uncertainty = 0.0000024e25; + unit_data(22).units = "m^-3"; + + unit_data(23).name = "Loschmidt constant (273.15 K, 101.325 kPa)"; + unit_data(23).value = 2.6867805e25; + unit_data(23).uncertainty = 0.0000024e25; + unit_data(23).units = "m^-3"; + + unit_data(24).name = "Mo x unit"; + unit_data(24).value = 1.00209952e-13; + unit_data(24).uncertainty = 0.00000053e-13; + unit_data(24).units = "m"; + + unit_data(25).name = "Newtonian constant of gravitation"; + unit_data(25).value = 6.67384e-11; + unit_data(25).uncertainty = 0.00080e-11; + unit_data(25).units = "m^3 kg^-1 s^-2"; + + unit_data(26).name = "Newtonian constant of gravitation over h-bar c"; + unit_data(26).value = 6.70837e-39; + unit_data(26).uncertainty = 0.00080e-39; + unit_data(26).units = "(GeV/c^2)^-2"; + + unit_data(27).name = "Planck constant"; + unit_data(27).value = 6.62606957e-34; + unit_data(27).uncertainty = 0.00000029e-34; + unit_data(27).units = "J s"; + + unit_data(28).name = "Planck constant in eV s"; + unit_data(28).value = 4.135667516e-15; + unit_data(28).uncertainty = 0.000000091e-15; + unit_data(28).units = "eV s"; + + unit_data(29).name = "Planck constant over 2 pi"; + unit_data(29).value = 1.054571726e-34; + unit_data(29).uncertainty = 0.000000047e-34; + unit_data(29).units = "J s"; + + unit_data(30).name = "Planck constant over 2 pi in eV s"; + unit_data(30).value = 6.58211928e-16; + unit_data(30).uncertainty = 0.00000015e-16; + unit_data(30).units = "eV s"; + + unit_data(31).name = "Planck constant over 2 pi times c in MeV fm"; + unit_data(31).value = 197.3269718; + unit_data(31).uncertainty = 0.0000044; + unit_data(31).units = "MeV fm"; + + unit_data(32).name = "Planck length"; + unit_data(32).value = 1.616199e-35; + unit_data(32).uncertainty = 0.000097e-35; + unit_data(32).units = "m"; + + unit_data(33).name = "Planck mass"; + unit_data(33).value = 2.17651e-8; + unit_data(33).uncertainty = 0.00013e-8; + unit_data(33).units = "kg"; + + unit_data(34).name = "Planck mass energy equivalent in GeV"; + unit_data(34).value = 1.220932e19; + unit_data(34).uncertainty = 0.000073e19; + unit_data(34).units = "GeV"; + + unit_data(35).name = "Planck temperature"; + unit_data(35).value = 1.416833e32; + unit_data(35).uncertainty = 0.000085e32; + unit_data(35).units = "K"; + + unit_data(36).name = "Planck time"; + unit_data(36).value = 5.39106e-44; + unit_data(36).uncertainty = 0.00032e-44; + unit_data(36).units = "s"; + + unit_data(37).name = "Rydberg constant"; + unit_data(37).value = 10973731.568539; + unit_data(37).uncertainty = 0.000055; + unit_data(37).units = "m^-1"; + + unit_data(38).name = "Rydberg constant times c in Hz"; + unit_data(38).value = 3.289841960364e15; + unit_data(38).uncertainty = 0.000000000017e15; + unit_data(38).units = "Hz"; + + unit_data(39).name = "Rydberg constant times hc in J"; + unit_data(39).value = 2.179872171e-18; + unit_data(39).uncertainty = 0.000000096e-18; + unit_data(39).units = "J"; + + unit_data(40).name = "Rydberg constant times hc in eV"; + unit_data(40).value = 13.60569253; + unit_data(40).uncertainty = 0.00000030; + unit_data(40).units = "eV"; + + unit_data(41).name = "Sackur-Tetrode constant (1 K, 100 kPa)"; + unit_data(41).value = -1.1517078; + unit_data(41).uncertainty = 0.0000023; + unit_data(41).units = ""; + + unit_data(42).name = "Sackur-Tetrode constant (1 K, 101.325 kPa)"; + unit_data(42).value = -1.1648708; + unit_data(42).uncertainty = 0.0000023; + unit_data(42).units = ""; + + unit_data(43).name = "Stefan-Boltzmann constant"; + unit_data(43).value = 5.670373e-8; + unit_data(43).uncertainty = 0.000021e-8; + unit_data(43).units = "W m^-2 K^-4"; + + unit_data(44).name = "Thomson cross section"; + unit_data(44).value = 0.6652458734e-28; + unit_data(44).uncertainty = 0.0000000013e-28; + unit_data(44).units = "m^2"; + + unit_data(45).name = "Wien frequency displacement law constant"; + unit_data(45).value = 5.8789254e10; + unit_data(45).uncertainty = 0.0000053e10; + unit_data(45).units = "Hz K^-1"; + + unit_data(46).name = "Wien wavelength displacement law constant"; + unit_data(46).value = 2.8977721e-3; + unit_data(46).uncertainty = 0.0000026e-3; + unit_data(46).units = "m K"; + + unit_data(47).name = "alpha particle mass"; + unit_data(47).value = 6.64465675e-27; + unit_data(47).uncertainty = 0.00000029e-27; + unit_data(47).units = "kg"; + + unit_data(48).name = "alpha particle mass energy equivalent"; + unit_data(48).value = 5.97191967e-10; + unit_data(48).uncertainty = 0.00000026e-10; + unit_data(48).units = "J"; + + unit_data(49).name = "alpha particle mass energy equivalent in MeV"; + unit_data(49).value = 3727.379240; + unit_data(49).uncertainty = 0.000082; + unit_data(49).units = "MeV"; + + unit_data(50).name = "alpha particle mass in u"; + unit_data(50).value = 4.001506179125; + unit_data(50).uncertainty = 0.000000000062; + unit_data(50).units = "u"; + + unit_data(51).name = "alpha particle molar mass"; + unit_data(51).value = 4.001506179125e-3; + unit_data(51).uncertainty = 0.000000000062e-3; + unit_data(51).units = "kg mol^-1"; + + unit_data(52).name = "alpha particle-electron mass ratio"; + unit_data(52).value = 7294.2995361; + unit_data(52).uncertainty = 0.0000029; + unit_data(52).units = ""; + + unit_data(53).name = "alpha particle-proton mass ratio"; + unit_data(53).value = 3.97259968933; + unit_data(53).uncertainty = 0.00000000036; + unit_data(53).units = ""; + + unit_data(54).name = "atomic mass constant"; + unit_data(54).value = 1.660538921e-27; + unit_data(54).uncertainty = 0.000000073e-27; + unit_data(54).units = "kg"; + + unit_data(55).name = "atomic mass constant energy equivalent"; + unit_data(55).value = 1.492417954e-10; + unit_data(55).uncertainty = 0.000000066e-10; + unit_data(55).units = "J"; + + unit_data(56).name = "atomic mass constant energy equivalent in MeV"; + unit_data(56).value = 931.494061; + unit_data(56).uncertainty = 0.000021; + unit_data(56).units = "MeV"; + + unit_data(57).name = "atomic mass unit-electron volt relationship"; + unit_data(57).value = 931.494061e6; + unit_data(57).uncertainty = 0.000021e6; + unit_data(57).units = "eV"; + + unit_data(58).name = "atomic mass unit-hartree relationship"; + unit_data(58).value = 3.4231776845e7; + unit_data(58).uncertainty = 0.0000000024e7; + unit_data(58).units = "E_h"; + + unit_data(59).name = "atomic mass unit-hertz relationship"; + unit_data(59).value = 2.2523427168e23; + unit_data(59).uncertainty = 0.0000000016e23; + unit_data(59).units = "Hz"; + + unit_data(60).name = "atomic mass unit-inverse meter relationship"; + unit_data(60).value = 7.5130066042e14; + unit_data(60).uncertainty = 0.0000000053e14; + unit_data(60).units = "m^-1"; + + unit_data(61).name = "atomic mass unit-joule relationship"; + unit_data(61).value = 1.492417954e-10; + unit_data(61).uncertainty = 0.000000066e-10; + unit_data(61).units = "J"; + + unit_data(62).name = "atomic mass unit-kelvin relationship"; + unit_data(62).value = 1.08095408e13; + unit_data(62).uncertainty = 0.00000098e13; + unit_data(62).units = "K"; + + unit_data(63).name = "atomic mass unit-kilogram relationship"; + unit_data(63).value = 1.660538921e-27; + unit_data(63).uncertainty = 0.000000073e-27; + unit_data(63).units = "kg"; + + unit_data(64).name = "atomic unit of 1st hyperpolarizability"; + unit_data(64).value = 3.206361449e-53; + unit_data(64).uncertainty = 0.000000071e-53; + unit_data(64).units = "C^3 m^3 J^-2"; + + unit_data(65).name = "atomic unit of 2nd hyperpolarizability"; + unit_data(65).value = 6.23538054e-65; + unit_data(65).uncertainty = 0.00000028e-65; + unit_data(65).units = "C^4 m^4 J^-3"; + + unit_data(66).name = "atomic unit of action"; + unit_data(66).value = 1.054571726e-34; + unit_data(66).uncertainty = 0.000000047e-34; + unit_data(66).units = "J s"; + + unit_data(67).name = "atomic unit of charge"; + unit_data(67).value = 1.602176565e-19; + unit_data(67).uncertainty = 0.000000035e-19; + unit_data(67).units = "C"; + + unit_data(68).name = "atomic unit of charge density"; + unit_data(68).value = 1.081202338e12; + unit_data(68).uncertainty = 0.000000024e12; + unit_data(68).units = "C m^-3"; + + unit_data(69).name = "atomic unit of current"; + unit_data(69).value = 6.62361795e-3; + unit_data(69).uncertainty = 0.00000015e-3; + unit_data(69).units = "A"; + + unit_data(70).name = "atomic unit of electric dipole mom."; + unit_data(70).value = 8.47835326e-30; + unit_data(70).uncertainty = 0.00000019e-30; + unit_data(70).units = "C m"; + + unit_data(71).name = "atomic unit of electric field"; + unit_data(71).value = 5.14220652e11; + unit_data(71).uncertainty = 0.00000011e11; + unit_data(71).units = "V m^-1"; + + unit_data(72).name = "atomic unit of electric field gradient"; + unit_data(72).value = 9.71736200e21; + unit_data(72).uncertainty = 0.00000021e21; + unit_data(72).units = "V m^-2"; + + unit_data(73).name = "atomic unit of electric polarizability"; + unit_data(73).value = 1.6487772754e-41; + unit_data(73).uncertainty = 0.0000000016e-41; + unit_data(73).units = "C^2 m^2 J^-1"; + + unit_data(74).name = "atomic unit of electric potential"; + unit_data(74).value = 27.21138505; + unit_data(74).uncertainty = 0.00000060; + unit_data(74).units = "V"; + + unit_data(75).name = "atomic unit of electric quadrupole mom."; + unit_data(75).value = 4.486551331e-40; + unit_data(75).uncertainty = 0.000000099e-40; + unit_data(75).units = "C m^2"; + + unit_data(76).name = "atomic unit of energy"; + unit_data(76).value = 4.35974434e-18; + unit_data(76).uncertainty = 0.00000019e-18; + unit_data(76).units = "J"; + + unit_data(77).name = "atomic unit of force"; + unit_data(77).value = 8.23872278e-8; + unit_data(77).uncertainty = 0.00000036e-8; + unit_data(77).units = "N"; + + unit_data(78).name = "atomic unit of length"; + unit_data(78).value = 0.52917721092e-10; + unit_data(78).uncertainty = 0.00000000017e-10; + unit_data(78).units = "m"; + + unit_data(79).name = "atomic unit of mag. dipole mom."; + unit_data(79).value = 1.854801936e-23; + unit_data(79).uncertainty = 0.000000041e-23; + unit_data(79).units = "J T^-1"; + + unit_data(80).name = "atomic unit of mag. flux density"; + unit_data(80).value = 2.350517464e5; + unit_data(80).uncertainty = 0.000000052e5; + unit_data(80).units = "T"; + + unit_data(81).name = "atomic unit of magnetizability"; + unit_data(81).value = 7.891036607e-29; + unit_data(81).uncertainty = 0.000000013e-29; + unit_data(81).units = "J T^-2"; + + unit_data(82).name = "atomic unit of mass"; + unit_data(82).value = 9.10938291e-31; + unit_data(82).uncertainty = 0.00000040e-31; + unit_data(82).units = "kg"; + + unit_data(83).name = "atomic unit of mom.um"; + unit_data(83).value = 1.992851740e-24; + unit_data(83).uncertainty = 0.000000088e-24; + unit_data(83).units = "kg m s^-1"; + + unit_data(84).name = "atomic unit of permittivity"; + unit_data(84).value = 1.112650056e-10; + unit_data(84).uncertainty = 0.0; + unit_data(84).units = "F m^-1"; + + unit_data(85).name = "atomic unit of time"; + unit_data(85).value = 2.418884326502e-17; + unit_data(85).uncertainty = 0.000000000012e-17; + unit_data(85).units = "s"; + + unit_data(86).name = "atomic unit of velocity"; + unit_data(86).value = 2.18769126379e6; + unit_data(86).uncertainty = 0.00000000071e6; + unit_data(86).units = "m s^-1"; + + unit_data(87).name = "characteristic impedance of vacuum"; + unit_data(87).value = 376.730313461; + unit_data(87).uncertainty = 0.0; + unit_data(87).units = "ohm"; + + unit_data(88).name = "classical electron radius"; + unit_data(88).value = 2.8179403267e-15; + unit_data(88).uncertainty = 0.0000000027e-15; + unit_data(88).units = "m"; + + unit_data(89).name = "conductance quantum"; + unit_data(89).value = 7.7480917346e-5; + unit_data(89).uncertainty = 0.0000000025e-5; + unit_data(89).units = "S"; + + unit_data(90).name = "conventional value of Josephson constant"; + unit_data(90).value = 483597.9e9; + unit_data(90).uncertainty = 0.0; + unit_data(90).units = "Hz V^-1"; + + unit_data(91).name = "conventional value of von Klitzing constant"; + unit_data(91).value = 25812.807; + unit_data(91).uncertainty = 0.0; + unit_data(91).units = "ohm"; + + unit_data(92).name = "deuteron g factor"; + unit_data(92).value = 0.8574382308; + unit_data(92).uncertainty = 0.0000000072; + unit_data(92).units = ""; + + unit_data(93).name = "deuteron mag. mom."; + unit_data(93).value = 0.433073489e-26; + unit_data(93).uncertainty = 0.000000010e-26; + unit_data(93).units = "J T^-1"; + + unit_data(94).name = "deuteron mag. mom. to Bohr magneton ratio"; + unit_data(94).value = 0.4669754556e-3; + unit_data(94).uncertainty = 0.0000000039e-3; + unit_data(94).units = ""; + + unit_data(95).name = "deuteron mag. mom. to nuclear magneton ratio"; + unit_data(95).value = 0.8574382308; + unit_data(95).uncertainty = 0.0000000072; + unit_data(95).units = ""; + + unit_data(96).name = "deuteron mass"; + unit_data(96).value = 3.34358348e-27; + unit_data(96).uncertainty = 0.00000015e-27; + unit_data(96).units = "kg"; + + unit_data(97).name = "deuteron mass energy equivalent"; + unit_data(97).value = 3.00506297e-10; + unit_data(97).uncertainty = 0.00000013e-10; + unit_data(97).units = "J"; + + unit_data(98).name = "deuteron mass energy equivalent in MeV"; + unit_data(98).value = 1875.612859; + unit_data(98).uncertainty = 0.000041; + unit_data(98).units = "MeV"; + + unit_data(99).name = "deuteron mass in u"; + unit_data(99).value = 2.013553212712; + unit_data(99).uncertainty = 0.000000000077; + unit_data(99).units = "u"; + + unit_data(100).name = "deuteron molar mass"; + unit_data(100).value = 2.013553212712e-3; + unit_data(100).uncertainty = 0.000000000077e-3; + unit_data(100).units = "kg mol^-1"; + + unit_data(101).name = "deuteron rms charge radius"; + unit_data(101).value = 2.1424e-15; + unit_data(101).uncertainty = 0.0021e-15; + unit_data(101).units = "m"; + + unit_data(102).name = "deuteron-electron mag. mom. ratio"; + unit_data(102).value = -4.664345537e-4; + unit_data(102).uncertainty = 0.000000039e-4; + unit_data(102).units = ""; + + unit_data(103).name = "deuteron-electron mass ratio"; + unit_data(103).value = 3670.4829652; + unit_data(103).uncertainty = 0.0000015; + unit_data(103).units = ""; + + unit_data(104).name = "deuteron-neutron mag. mom. ratio"; + unit_data(104).value = -0.44820652; + unit_data(104).uncertainty = 0.00000011; + unit_data(104).units = ""; + + unit_data(105).name = "deuteron-proton mag. mom. ratio"; + unit_data(105).value = 0.3070122070; + unit_data(105).uncertainty = 0.0000000024; + unit_data(105).units = ""; + + unit_data(106).name = "deuteron-proton mass ratio"; + unit_data(106).value = 1.99900750097; + unit_data(106).uncertainty = 0.00000000018; + unit_data(106).units = ""; + + unit_data(107).name = "electric constant"; + unit_data(107).value = 8.854187817e-12; + unit_data(107).uncertainty = 0.0; + unit_data(107).units = "F m^-1"; + + unit_data(108).name = "electron charge to mass quotient"; + unit_data(108).value = -1.758820088e11; + unit_data(108).uncertainty = 0.000000039e11; + unit_data(108).units = "C kg^-1"; + + unit_data(109).name = "electron g factor"; + unit_data(109).value = -2.00231930436153; + unit_data(109).uncertainty = 0.00000000000053; + unit_data(109).units = ""; + + unit_data(110).name = "electron gyromag. ratio"; + unit_data(110).value = 1.760859708e11; + unit_data(110).uncertainty = 0.000000039e11; + unit_data(110).units = "s^-1 T^-1"; + + unit_data(111).name = "electron gyromag. ratio over 2 pi"; + unit_data(111).value = 28024.95266; + unit_data(111).uncertainty = 0.00062; + unit_data(111).units = "MHz T^-1"; + + unit_data(112).name = "electron mag. mom."; + unit_data(112).value = -928.476430e-26; + unit_data(112).uncertainty = 0.000021e-26; + unit_data(112).units = "J T^-1"; + + unit_data(113).name = "electron mag. mom. anomaly"; + unit_data(113).value = 1.15965218076e-3; + unit_data(113).uncertainty = 0.00000000027e-3; + unit_data(113).units = ""; + + unit_data(114).name = "electron mag. mom. to Bohr magneton ratio"; + unit_data(114).value = -1.00115965218076; + unit_data(114).uncertainty = 0.00000000000027; + unit_data(114).units = ""; + + unit_data(115).name = "electron mag. mom. to nuclear magneton ratio"; + unit_data(115).value = -1838.28197090; + unit_data(115).uncertainty = 0.00000075; + unit_data(115).units = ""; + + unit_data(116).name = "electron mass"; + unit_data(116).value = 9.10938291e-31; + unit_data(116).uncertainty = 0.00000040e-31; + unit_data(116).units = "kg"; + + unit_data(117).name = "electron mass energy equivalent"; + unit_data(117).value = 8.18710506e-14; + unit_data(117).uncertainty = 0.00000036e-14; + unit_data(117).units = "J"; + + unit_data(118).name = "electron mass energy equivalent in MeV"; + unit_data(118).value = 0.510998928; + unit_data(118).uncertainty = 0.000000011; + unit_data(118).units = "MeV"; + + unit_data(119).name = "electron mass in u"; + unit_data(119).value = 5.4857990946e-4; + unit_data(119).uncertainty = 0.0000000022e-4; + unit_data(119).units = "u"; + + unit_data(120).name = "electron molar mass"; + unit_data(120).value = 5.4857990946e-7; + unit_data(120).uncertainty = 0.0000000022e-7; + unit_data(120).units = "kg mol^-1"; + + unit_data(121).name = "electron to alpha particle mass ratio"; + unit_data(121).value = 1.37093355578e-4; + unit_data(121).uncertainty = 0.00000000055e-4; + unit_data(121).units = ""; + + unit_data(122).name = "electron to shielded helion mag. mom. ratio"; + unit_data(122).value = 864.058257; + unit_data(122).uncertainty = 0.000010; + unit_data(122).units = ""; + + unit_data(123).name = "electron to shielded proton mag. mom. ratio"; + unit_data(123).value = -658.2275971; + unit_data(123).uncertainty = 0.0000072; + unit_data(123).units = ""; + + unit_data(124).name = "electron volt"; + unit_data(124).value = 1.602176565e-19; + unit_data(124).uncertainty = 0.000000035e-19; + unit_data(124).units = "J"; + + unit_data(125).name = "electron volt-atomic mass unit relationship"; + unit_data(125).value = 1.073544150e-9; + unit_data(125).uncertainty = 0.000000024e-9; + unit_data(125).units = "u"; + + unit_data(126).name = "electron volt-hartree relationship"; + unit_data(126).value = 3.674932379e-2; + unit_data(126).uncertainty = 0.000000081e-2; + unit_data(126).units = "E_h"; + + unit_data(127).name = "electron volt-hertz relationship"; + unit_data(127).value = 2.417989348e14; + unit_data(127).uncertainty = 0.000000053e14; + unit_data(127).units = "Hz"; + + unit_data(128).name = "electron volt-inverse meter relationship"; + unit_data(128).value = 8.06554429e5; + unit_data(128).uncertainty = 0.00000018e5; + unit_data(128).units = "m^-1"; + + unit_data(129).name = "electron volt-joule relationship"; + unit_data(129).value = 1.602176565e-19; + unit_data(129).uncertainty = 0.000000035e-19; + unit_data(129).units = "J"; + + unit_data(130).name = "electron volt-kelvin relationship"; + unit_data(130).value = 1.1604519e4; + unit_data(130).uncertainty = 0.0000011e4; + unit_data(130).units = "K"; + + unit_data(131).name = "electron volt-kilogram relationship"; + unit_data(131).value = 1.782661845e-36; + unit_data(131).uncertainty = 0.000000039e-36; + unit_data(131).units = "kg"; + + unit_data(132).name = "electron-deuteron mag. mom. ratio"; + unit_data(132).value = -2143.923498; + unit_data(132).uncertainty = 0.000018; + unit_data(132).units = ""; + + unit_data(133).name = "electron-deuteron mass ratio"; + unit_data(133).value = 2.7244371095e-4; + unit_data(133).uncertainty = 0.0000000011e-4; + unit_data(133).units = ""; + + unit_data(134).name = "electron-helion mass ratio"; + unit_data(134).value = 1.8195430761e-4; + unit_data(134).uncertainty = 0.0000000017e-4; + unit_data(134).units = ""; + + unit_data(135).name = "electron-muon mag. mom. ratio"; + unit_data(135).value = 206.7669896; + unit_data(135).uncertainty = 0.0000052; + unit_data(135).units = ""; + + unit_data(136).name = "electron-muon mass ratio"; + unit_data(136).value = 4.83633166e-3; + unit_data(136).uncertainty = 0.00000012e-3; + unit_data(136).units = ""; + + unit_data(137).name = "electron-neutron mag. mom. ratio"; + unit_data(137).value = 960.92050; + unit_data(137).uncertainty = 0.00023; + unit_data(137).units = ""; + + unit_data(138).name = "electron-neutron mass ratio"; + unit_data(138).value = 5.4386734461e-4; + unit_data(138).uncertainty = 0.0000000032e-4; + unit_data(138).units = ""; + + unit_data(139).name = "electron-proton mag. mom. ratio"; + unit_data(139).value = -658.2106848; + unit_data(139).uncertainty = 0.0000054; + unit_data(139).units = ""; + + unit_data(140).name = "electron-proton mass ratio"; + unit_data(140).value = 5.4461702178e-4; + unit_data(140).uncertainty = 0.0000000022e-4; + unit_data(140).units = ""; + + unit_data(141).name = "electron-tau mass ratio"; + unit_data(141).value = 2.87592e-4; + unit_data(141).uncertainty = 0.00026e-4; + unit_data(141).units = ""; + + unit_data(142).name = "electron-triton mass ratio"; + unit_data(142).value = 1.8192000653e-4; + unit_data(142).uncertainty = 0.0000000017e-4; + unit_data(142).units = ""; + + unit_data(143).name = "elementary charge"; + unit_data(143).value = 1.602176565e-19; + unit_data(143).uncertainty = 0.000000035e-19; + unit_data(143).units = "C"; + + unit_data(144).name = "elementary charge over h"; + unit_data(144).value = 2.417989348e14; + unit_data(144).uncertainty = 0.000000053e14; + unit_data(144).units = "A J^-1"; + + unit_data(145).name = "fine-structure constant"; + unit_data(145).value = 7.2973525698e-3; + unit_data(145).uncertainty = 0.0000000024e-3; + unit_data(145).units = ""; + + unit_data(146).name = "first radiation constant"; + unit_data(146).value = 3.74177153e-16; + unit_data(146).uncertainty = 0.00000017e-16; + unit_data(146).units = "W m^2"; + + unit_data(147).name = "first radiation constant for spectral radiance"; + unit_data(147).value = 1.191042869e-16; + unit_data(147).uncertainty = 0.000000053e-16; + unit_data(147).units = "W m^2 sr^-1"; + + unit_data(148).name = "hartree-atomic mass unit relationship"; + unit_data(148).value = 2.9212623246e-8; + unit_data(148).uncertainty = 0.0000000021e-8; + unit_data(148).units = "u"; + + unit_data(149).name = "hartree-electron volt relationship"; + unit_data(149).value = 27.21138505; + unit_data(149).uncertainty = 0.00000060; + unit_data(149).units = "eV"; + + unit_data(150).name = "hartree-hertz relationship"; + unit_data(150).value = 6.579683920729e15; + unit_data(150).uncertainty = 0.000000000033e15; + unit_data(150).units = "Hz"; + + unit_data(151).name = "hartree-inverse meter relationship"; + unit_data(151).value = 2.194746313708e7; + unit_data(151).uncertainty = 0.000000000011e7; + unit_data(151).units = "m^-1"; + + unit_data(152).name = "hartree-joule relationship"; + unit_data(152).value = 4.35974434e-18; + unit_data(152).uncertainty = 0.00000019e-18; + unit_data(152).units = "J"; + + unit_data(153).name = "hartree-kelvin relationship"; + unit_data(153).value = 3.1577504e5; + unit_data(153).uncertainty = 0.0000029e5; + unit_data(153).units = "K"; + + unit_data(154).name = "hartree-kilogram relationship"; + unit_data(154).value = 4.85086979e-35; + unit_data(154).uncertainty = 0.00000021e-35; + unit_data(154).units = "kg"; + + unit_data(155).name = "helion g factor"; + unit_data(155).value = -4.255250613; + unit_data(155).uncertainty = 0.000000050; + unit_data(155).units = ""; + + unit_data(156).name = "helion mag. mom."; + unit_data(156).value = -1.074617486e-26; + unit_data(156).uncertainty = 0.000000027e-26; + unit_data(156).units = "J T^-1"; + + unit_data(157).name = "helion mag. mom. to Bohr magneton ratio"; + unit_data(157).value = -1.158740958e-3; + unit_data(157).uncertainty = 0.000000014e-3; + unit_data(157).units = ""; + + unit_data(158).name = "helion mag. mom. to nuclear magneton ratio"; + unit_data(158).value = -2.127625306; + unit_data(158).uncertainty = 0.000000025; + unit_data(158).units = ""; + + unit_data(159).name = "helion mass"; + unit_data(159).value = 5.00641234e-27; + unit_data(159).uncertainty = 0.00000022e-27; + unit_data(159).units = "kg"; + + unit_data(160).name = "helion mass energy equivalent"; + unit_data(160).value = 4.49953902e-10; + unit_data(160).uncertainty = 0.00000020e-10; + unit_data(160).units = "J"; + + unit_data(161).name = "helion mass energy equivalent in MeV"; + unit_data(161).value = 2808.391482; + unit_data(161).uncertainty = 0.000062; + unit_data(161).units = "MeV"; + + unit_data(162).name = "helion mass in u"; + unit_data(162).value = 3.0149322468; + unit_data(162).uncertainty = 0.0000000025; + unit_data(162).units = "u"; + + unit_data(163).name = "helion molar mass"; + unit_data(163).value = 3.0149322468e-3; + unit_data(163).uncertainty = 0.0000000025e-3; + unit_data(163).units = "kg mol^-1"; + + unit_data(164).name = "helion-electron mass ratio"; + unit_data(164).value = 5495.8852754; + unit_data(164).uncertainty = 0.0000050; + unit_data(164).units = ""; + + unit_data(165).name = "helion-proton mass ratio"; + unit_data(165).value = 2.9931526707; + unit_data(165).uncertainty = 0.0000000025; + unit_data(165).units = ""; + + unit_data(166).name = "hertz-atomic mass unit relationship"; + unit_data(166).value = 4.4398216689e-24; + unit_data(166).uncertainty = 0.0000000031e-24; + unit_data(166).units = "u"; + + unit_data(167).name = "hertz-electron volt relationship"; + unit_data(167).value = 4.135667516e-15; + unit_data(167).uncertainty = 0.000000091e-15; + unit_data(167).units = "eV"; + + unit_data(168).name = "hertz-hartree relationship"; + unit_data(168).value = 1.5198298460045e-16; + unit_data(168).uncertainty = 0.0000000000076e-16; + unit_data(168).units = "E_h"; + + unit_data(169).name = "hertz-inverse meter relationship"; + unit_data(169).value = 3.335640951e-9; + unit_data(169).uncertainty = 0.0; + unit_data(169).units = "m^-1"; + + unit_data(170).name = "hertz-joule relationship"; + unit_data(170).value = 6.62606957e-34; + unit_data(170).uncertainty = 0.00000029e-34; + unit_data(170).units = "J"; + + unit_data(171).name = "hertz-kelvin relationship"; + unit_data(171).value = 4.7992434e-11; + unit_data(171).uncertainty = 0.0000044e-11; + unit_data(171).units = "K"; + + unit_data(172).name = "hertz-kilogram relationship"; + unit_data(172).value = 7.37249668e-51; + unit_data(172).uncertainty = 0.00000033e-51; + unit_data(172).units = "kg"; + + unit_data(173).name = "inverse fine-structure constant"; + unit_data(173).value = 137.035999074; + unit_data(173).uncertainty = 0.000000044; + unit_data(173).units = ""; + + unit_data(174).name = "inverse meter-atomic mass unit relationship"; + unit_data(174).value = 1.33102505120e-15; + unit_data(174).uncertainty = 0.00000000094e-15; + unit_data(174).units = "u"; + + unit_data(175).name = "inverse meter-electron volt relationship"; + unit_data(175).value = 1.239841930e-6; + unit_data(175).uncertainty = 0.000000027e-6; + unit_data(175).units = "eV"; + + unit_data(176).name = "inverse meter-hartree relationship"; + unit_data(176).value = 4.556335252755e-8; + unit_data(176).uncertainty = 0.000000000023e-8; + unit_data(176).units = "E_h"; + + unit_data(177).name = "inverse meter-hertz relationship"; + unit_data(177).value = 299792458; + unit_data(177).uncertainty = 0.0; + unit_data(177).units = "Hz"; + + unit_data(178).name = "inverse meter-joule relationship"; + unit_data(178).value = 1.986445684e-25; + unit_data(178).uncertainty = 0.000000088e-25; + unit_data(178).units = "J"; + + unit_data(179).name = "inverse meter-kelvin relationship"; + unit_data(179).value = 1.4387770e-2; + unit_data(179).uncertainty = 0.0000013e-2; + unit_data(179).units = "K"; + + unit_data(180).name = "inverse meter-kilogram relationship"; + unit_data(180).value = 2.210218902e-42; + unit_data(180).uncertainty = 0.000000098e-42; + unit_data(180).units = "kg"; + + unit_data(181).name = "inverse of conductance quantum"; + unit_data(181).value = 12906.4037217; + unit_data(181).uncertainty = 0.0000042; + unit_data(181).units = "ohm"; + + unit_data(182).name = "joule-atomic mass unit relationship"; + unit_data(182).value = 6.70053585e9; + unit_data(182).uncertainty = 0.00000030e9; + unit_data(182).units = "u"; + + unit_data(183).name = "joule-electron volt relationship"; + unit_data(183).value = 6.24150934e18; + unit_data(183).uncertainty = 0.00000014e18; + unit_data(183).units = "eV"; + + unit_data(184).name = "joule-hartree relationship"; + unit_data(184).value = 2.29371248e17; + unit_data(184).uncertainty = 0.00000010e17; + unit_data(184).units = "E_h"; + + unit_data(185).name = "joule-hertz relationship"; + unit_data(185).value = 1.509190311e33; + unit_data(185).uncertainty = 0.000000067e33; + unit_data(185).units = "Hz"; + + unit_data(186).name = "joule-inverse meter relationship"; + unit_data(186).value = 5.03411701e24; + unit_data(186).uncertainty = 0.00000022e24; + unit_data(186).units = "m^-1"; + + unit_data(187).name = "joule-kelvin relationship"; + unit_data(187).value = 7.2429716e22; + unit_data(187).uncertainty = 0.0000066e22; + unit_data(187).units = "K"; + + unit_data(188).name = "joule-kilogram relationship"; + unit_data(188).value = 1.112650056e-17; + unit_data(188).uncertainty = 0.0; + unit_data(188).units = "kg"; + + unit_data(189).name = "kelvin-atomic mass unit relationship"; + unit_data(189).value = 9.2510868e-14; + unit_data(189).uncertainty = 0.0000084e-14; + unit_data(189).units = "u"; + + unit_data(190).name = "kelvin-electron volt relationship"; + unit_data(190).value = 8.6173324e-5; + unit_data(190).uncertainty = 0.0000078e-5; + unit_data(190).units = "eV"; + + unit_data(191).name = "kelvin-hartree relationship"; + unit_data(191).value = 3.1668114e-6; + unit_data(191).uncertainty = 0.0000029e-6; + unit_data(191).units = "E_h"; + + unit_data(192).name = "kelvin-hertz relationship"; + unit_data(192).value = 2.0836618e10; + unit_data(192).uncertainty = 0.0000019e10; + unit_data(192).units = "Hz"; + + unit_data(193).name = "kelvin-inverse meter relationship"; + unit_data(193).value = 69.503476; + unit_data(193).uncertainty = 0.000063; + unit_data(193).units = "m^-1"; + + unit_data(194).name = "kelvin-joule relationship"; + unit_data(194).value = 1.3806488e-23; + unit_data(194).uncertainty = 0.0000013e-23; + unit_data(194).units = "J"; + + unit_data(195).name = "kelvin-kilogram relationship"; + unit_data(195).value = 1.5361790e-40; + unit_data(195).uncertainty = 0.0000014e-40; + unit_data(195).units = "kg"; + + unit_data(196).name = "kilogram-atomic mass unit relationship"; + unit_data(196).value = 6.02214129e26; + unit_data(196).uncertainty = 0.00000027e26; + unit_data(196).units = "u"; + + unit_data(197).name = "kilogram-electron volt relationship"; + unit_data(197).value = 5.60958885e35; + unit_data(197).uncertainty = 0.00000012e35; + unit_data(197).units = "eV"; + + unit_data(198).name = "kilogram-hartree relationship"; + unit_data(198).value = 2.061485968e34; + unit_data(198).uncertainty = 0.000000091e34; + unit_data(198).units = "E_h"; + + unit_data(199).name = "kilogram-hertz relationship"; + unit_data(199).value = 1.356392608e50; + unit_data(199).uncertainty = 0.000000060e50; + unit_data(199).units = "Hz"; + + unit_data(200).name = "kilogram-inverse meter relationship"; + unit_data(200).value = 4.52443873e41; + unit_data(200).uncertainty = 0.00000020e41; + unit_data(200).units = "m^-1"; + + unit_data(201).name = "kilogram-joule relationship"; + unit_data(201).value = 8.987551787e16; + unit_data(201).uncertainty = 0.0; + unit_data(201).units = "J"; + + unit_data(202).name = "kilogram-kelvin relationship"; + unit_data(202).value = 6.5096582e39; + unit_data(202).uncertainty = 0.0000059e39; + unit_data(202).units = "K"; + + unit_data(203).name = "lattice parameter of silicon"; + unit_data(203).value = 543.1020504e-12; + unit_data(203).uncertainty = 0.0000089e-12; + unit_data(203).units = "m"; + + unit_data(204).name = "mag. constant"; + unit_data(204).value = 12.566370614e-7; + unit_data(204).uncertainty = 0.0; + unit_data(204).units = "N A^-2"; + + unit_data(205).name = "mag. flux quantum"; + unit_data(205).value = 2.067833758e-15; + unit_data(205).uncertainty = 0.000000046e-15; + unit_data(205).units = "Wb"; + + unit_data(206).name = "molar Planck constant"; + unit_data(206).value = 3.9903127176e-10; + unit_data(206).uncertainty = 0.0000000028e-10; + unit_data(206).units = "J s mol^-1"; + + unit_data(207).name = "molar Planck constant times c"; + unit_data(207).value = 0.119626565779; + unit_data(207).uncertainty = 0.000000000084; + unit_data(207).units = "J m mol^-1"; + + unit_data(208).name = "molar gas constant"; + unit_data(208).value = 8.3144621; + unit_data(208).uncertainty = 0.0000075; + unit_data(208).units = "J mol^-1 K^-1"; + + unit_data(209).name = "molar mass constant"; + unit_data(209).value = 1e-3; + unit_data(209).uncertainty = 0.0; + unit_data(209).units = "kg mol^-1"; + + unit_data(210).name = "molar mass of carbon-12"; + unit_data(210).value = 12e-3; + unit_data(210).uncertainty = 0.0; + unit_data(210).units = "kg mol^-1"; + + unit_data(211).name = "molar volume of ideal gas (273.15 K, 100 kPa)"; + unit_data(211).value = 22.710953e-3; + unit_data(211).uncertainty = 0.000021e-3; + unit_data(211).units = "m^3 mol^-1"; + + unit_data(212).name = "molar volume of ideal gas (273.15 K, 101.325 kPa)"; + unit_data(212).value = 22.413968e-3; + unit_data(212).uncertainty = 0.000020e-3; + unit_data(212).units = "m^3 mol^-1"; + + unit_data(213).name = "molar volume of silicon"; + unit_data(213).value = 12.05883301e-6; + unit_data(213).uncertainty = 0.00000080e-6; + unit_data(213).units = "m^3 mol^-1"; + + unit_data(214).name = "muon Compton wavelength"; + unit_data(214).value = 11.73444103e-15; + unit_data(214).uncertainty = 0.00000030e-15; + unit_data(214).units = "m"; + + unit_data(215).name = "muon Compton wavelength over 2 pi"; + unit_data(215).value = 1.867594294e-15; + unit_data(215).uncertainty = 0.000000047e-15; + unit_data(215).units = "m"; + + unit_data(216).name = "muon g factor"; + unit_data(216).value = -2.0023318418; + unit_data(216).uncertainty = 0.0000000013; + unit_data(216).units = ""; + + unit_data(217).name = "muon mag. mom."; + unit_data(217).value = -4.49044807e-26; + unit_data(217).uncertainty = 0.00000015e-26; + unit_data(217).units = "J T^-1"; + + unit_data(218).name = "muon mag. mom. anomaly"; + unit_data(218).value = 1.16592091e-3; + unit_data(218).uncertainty = 0.00000063e-3; + unit_data(218).units = ""; + + unit_data(219).name = "muon mag. mom. to Bohr magneton ratio"; + unit_data(219).value = -4.84197044e-3; + unit_data(219).uncertainty = 0.00000012e-3; + unit_data(219).units = ""; + + unit_data(220).name = "muon mag. mom. to nuclear magneton ratio"; + unit_data(220).value = -8.89059697; + unit_data(220).uncertainty = 0.00000022; + unit_data(220).units = ""; + + unit_data(221).name = "muon mass"; + unit_data(221).value = 1.883531475e-28; + unit_data(221).uncertainty = 0.000000096e-28; + unit_data(221).units = "kg"; + + unit_data(222).name = "muon mass energy equivalent"; + unit_data(222).value = 1.692833667e-11; + unit_data(222).uncertainty = 0.000000086e-11; + unit_data(222).units = "J"; + + unit_data(223).name = "muon mass energy equivalent in MeV"; + unit_data(223).value = 105.6583715; + unit_data(223).uncertainty = 0.0000035; + unit_data(223).units = "MeV"; + + unit_data(224).name = "muon mass in u"; + unit_data(224).value = 0.1134289267; + unit_data(224).uncertainty = 0.0000000029; + unit_data(224).units = "u"; + + unit_data(225).name = "muon molar mass"; + unit_data(225).value = 0.1134289267e-3; + unit_data(225).uncertainty = 0.0000000029e-3; + unit_data(225).units = "kg mol^-1"; + + unit_data(226).name = "muon-electron mass ratio"; + unit_data(226).value = 206.7682843; + unit_data(226).uncertainty = 0.0000052; + unit_data(226).units = ""; + + unit_data(227).name = "muon-neutron mass ratio"; + unit_data(227).value = 0.1124545177; + unit_data(227).uncertainty = 0.0000000028; + unit_data(227).units = ""; + + unit_data(228).name = "muon-proton mag. mom. ratio"; + unit_data(228).value = -3.183345107; + unit_data(228).uncertainty = 0.000000084; + unit_data(228).units = ""; + + unit_data(229).name = "muon-proton mass ratio"; + unit_data(229).value = 0.1126095272; + unit_data(229).uncertainty = 0.0000000028; + unit_data(229).units = ""; + + unit_data(230).name = "muon-tau mass ratio"; + unit_data(230).value = 5.94649e-2; + unit_data(230).uncertainty = 0.00054e-2; + unit_data(230).units = ""; + + unit_data(231).name = "natural unit of action"; + unit_data(231).value = 1.054571726e-34; + unit_data(231).uncertainty = 0.000000047e-34; + unit_data(231).units = "J s"; + + unit_data(232).name = "natural unit of action in eV s"; + unit_data(232).value = 6.58211928e-16; + unit_data(232).uncertainty = 0.00000015e-16; + unit_data(232).units = "eV s"; + + unit_data(233).name = "natural unit of energy"; + unit_data(233).value = 8.18710506e-14; + unit_data(233).uncertainty = 0.00000036e-14; + unit_data(233).units = "J"; + + unit_data(234).name = "natural unit of energy in MeV"; + unit_data(234).value = 0.510998928; + unit_data(234).uncertainty = 0.000000011; + unit_data(234).units = "MeV"; + + unit_data(235).name = "natural unit of length"; + unit_data(235).value = 386.15926800e-15; + unit_data(235).uncertainty = 0.00000025e-15; + unit_data(235).units = "m"; + + unit_data(236).name = "natural unit of mass"; + unit_data(236).value = 9.10938291e-31; + unit_data(236).uncertainty = 0.00000040e-31; + unit_data(236).units = "kg"; + + unit_data(237).name = "natural unit of mom.um"; + unit_data(237).value = 2.73092429e-22; + unit_data(237).uncertainty = 0.00000012e-22; + unit_data(237).units = "kg m s^-1"; + + unit_data(238).name = "natural unit of mom.um in MeV/c"; + unit_data(238).value = 0.510998928; + unit_data(238).uncertainty = 0.000000011; + unit_data(238).units = "MeV/c"; + + unit_data(239).name = "natural unit of time"; + unit_data(239).value = 1.28808866833e-21; + unit_data(239).uncertainty = 0.00000000083e-21; + unit_data(239).units = "s"; + + unit_data(240).name = "natural unit of velocity"; + unit_data(240).value = 299792458; + unit_data(240).uncertainty = 0.0; + unit_data(240).units = "m s^-1"; + + unit_data(241).name = "neutron Compton wavelength"; + unit_data(241).value = 1.3195909068e-15; + unit_data(241).uncertainty = 0.0000000011e-15; + unit_data(241).units = "m"; + + unit_data(242).name = "neutron Compton wavelength over 2 pi"; + unit_data(242).value = 0.21001941568e-15; + unit_data(242).uncertainty = 0.00000000017e-15; + unit_data(242).units = "m"; + + unit_data(243).name = "neutron g factor"; + unit_data(243).value = -3.82608545; + unit_data(243).uncertainty = 0.00000090; + unit_data(243).units = ""; + + unit_data(244).name = "neutron gyromag. ratio"; + unit_data(244).value = 1.83247179e8; + unit_data(244).uncertainty = 0.00000043e8; + unit_data(244).units = "s^-1 T^-1"; + + unit_data(245).name = "neutron gyromag. ratio over 2 pi"; + unit_data(245).value = 29.1646943; + unit_data(245).uncertainty = 0.0000069; + unit_data(245).units = "MHz T^-1"; + + unit_data(246).name = "neutron mag. mom."; + unit_data(246).value = -0.96623647e-26; + unit_data(246).uncertainty = 0.00000023e-26; + unit_data(246).units = "J T^-1"; + + unit_data(247).name = "neutron mag. mom. to Bohr magneton ratio"; + unit_data(247).value = -1.04187563e-3; + unit_data(247).uncertainty = 0.00000025e-3; + unit_data(247).units = ""; + + unit_data(248).name = "neutron mag. mom. to nuclear magneton ratio"; + unit_data(248).value = -1.91304272; + unit_data(248).uncertainty = 0.00000045; + unit_data(248).units = ""; + + unit_data(249).name = "neutron mass"; + unit_data(249).value = 1.674927351e-27; + unit_data(249).uncertainty = 0.000000074e-27; + unit_data(249).units = "kg"; + + unit_data(250).name = "neutron mass energy equivalent"; + unit_data(250).value = 1.505349631e-10; + unit_data(250).uncertainty = 0.000000066e-10; + unit_data(250).units = "J"; + + unit_data(251).name = "neutron mass energy equivalent in MeV"; + unit_data(251).value = 939.565379; + unit_data(251).uncertainty = 0.000021; + unit_data(251).units = "MeV"; + + unit_data(252).name = "neutron mass in u"; + unit_data(252).value = 1.00866491600; + unit_data(252).uncertainty = 0.00000000043; + unit_data(252).units = "u"; + + unit_data(253).name = "neutron molar mass"; + unit_data(253).value = 1.00866491600e-3; + unit_data(253).uncertainty = 0.00000000043e-3; + unit_data(253).units = "kg mol^-1"; + + unit_data(254).name = "neutron to shielded proton mag. mom. ratio"; + unit_data(254).value = -0.68499694; + unit_data(254).uncertainty = 0.00000016; + unit_data(254).units = ""; + + unit_data(255).name = "neutron-electron mag. mom. ratio"; + unit_data(255).value = 1.04066882e-3; + unit_data(255).uncertainty = 0.00000025e-3; + unit_data(255).units = ""; + + unit_data(256).name = "neutron-electron mass ratio"; + unit_data(256).value = 1838.6836605; + unit_data(256).uncertainty = 0.0000011; + unit_data(256).units = ""; + + unit_data(257).name = "neutron-muon mass ratio"; + unit_data(257).value = 8.89248400; + unit_data(257).uncertainty = 0.00000022; + unit_data(257).units = ""; + + unit_data(258).name = "neutron-proton mag. mom. ratio"; + unit_data(258).value = -0.68497934; + unit_data(258).uncertainty = 0.00000016; + unit_data(258).units = ""; + + unit_data(259).name = "neutron-proton mass difference"; + unit_data(259).value = 2.30557392e-30; + unit_data(259).uncertainty = 0.00000076e-30; + unit_data(259).units = ""; + + unit_data(260).name = "neutron-proton mass difference energy equivalent"; + unit_data(260).value = 2.07214650e-13; + unit_data(260).uncertainty = 0.00000068e-13; + unit_data(260).units = ""; + + unit_data(261).name = "neutron-proton mass difference energy equivalent in MeV"; + unit_data(261).value = 1.29333217; + unit_data(261).uncertainty = 0.00000042; + unit_data(261).units = ""; + + unit_data(262).name = "neutron-proton mass difference in u"; + unit_data(262).value = 0.00138844919; + unit_data(262).uncertainty = 0.00000000045; + unit_data(262).units = ""; + + unit_data(263).name = "neutron-proton mass ratio"; + unit_data(263).value = 1.00137841917; + unit_data(263).uncertainty = 0.00000000045; + unit_data(263).units = ""; + + unit_data(264).name = "neutron-tau mass ratio"; + unit_data(264).value = 0.528790; + unit_data(264).uncertainty = 0.000048; + unit_data(264).units = ""; + + unit_data(265).name = "nuclear magneton"; + unit_data(265).value = 5.05078353e-27; + unit_data(265).uncertainty = 0.00000011e-27; + unit_data(265).units = "J T^-1"; + + unit_data(266).name = "nuclear magneton in K/T"; + unit_data(266).value = 3.6582682e-4; + unit_data(266).uncertainty = 0.0000033e-4; + unit_data(266).units = "K T^-1"; + + unit_data(267).name = "nuclear magneton in MHz/T"; + unit_data(267).value = 7.62259357; + unit_data(267).uncertainty = 0.00000017; + unit_data(267).units = "MHz T^-1"; + + unit_data(268).name = "nuclear magneton in eV/T"; + unit_data(268).value = 3.1524512605e-8; + unit_data(268).uncertainty = 0.0000000022e-8; + unit_data(268).units = "eV T^-1"; + + unit_data(269).name = "nuclear magneton in inverse meters per tesla"; + unit_data(269).value = 2.542623527e-2; + unit_data(269).uncertainty = 0.000000056e-2; + unit_data(269).units = "m^-1 T^-1"; + + unit_data(270).name = "proton Compton wavelength"; + unit_data(270).value = 1.32140985623e-15; + unit_data(270).uncertainty = 0.00000000094e-15; + unit_data(270).units = "m"; + + unit_data(271).name = "proton Compton wavelength over 2 pi"; + unit_data(271).value = 0.21030891047e-15; + unit_data(271).uncertainty = 0.00000000015e-15; + unit_data(271).units = "m"; + + unit_data(272).name = "proton charge to mass quotient"; + unit_data(272).value = 9.57883358e7; + unit_data(272).uncertainty = 0.00000021e7; + unit_data(272).units = "C kg^-1"; + + unit_data(273).name = "proton g factor"; + unit_data(273).value = 5.585694713; + unit_data(273).uncertainty = 0.000000046; + unit_data(273).units = ""; + + unit_data(274).name = "proton gyromag. ratio"; + unit_data(274).value = 2.675222005e8; + unit_data(274).uncertainty = 0.000000063e8; + unit_data(274).units = "s^-1 T^-1"; + + unit_data(275).name = "proton gyromag. ratio over 2 pi"; + unit_data(275).value = 42.5774806; + unit_data(275).uncertainty = 0.0000010; + unit_data(275).units = "MHz T^-1"; + + unit_data(276).name = "proton mag. mom."; + unit_data(276).value = 1.410606743e-26; + unit_data(276).uncertainty = 0.000000033e-26; + unit_data(276).units = "J T^-1"; + + unit_data(277).name = "proton mag. mom. to Bohr magneton ratio"; + unit_data(277).value = 1.521032210e-3; + unit_data(277).uncertainty = 0.000000012e-3; + unit_data(277).units = ""; + + unit_data(278).name = "proton mag. mom. to nuclear magneton ratio"; + unit_data(278).value = 2.792847356; + unit_data(278).uncertainty = 0.000000023; + unit_data(278).units = ""; + + unit_data(279).name = "proton mag. shielding correction"; + unit_data(279).value = 25.694e-6; + unit_data(279).uncertainty = 0.014e-6; + unit_data(279).units = ""; + + unit_data(280).name = "proton mass"; + unit_data(280).value = 1.672621777e-27; + unit_data(280).uncertainty = 0.000000074e-27; + unit_data(280).units = "kg"; + + unit_data(281).name = "proton mass energy equivalent"; + unit_data(281).value = 1.503277484e-10; + unit_data(281).uncertainty = 0.000000066e-10; + unit_data(281).units = "J"; + + unit_data(282).name = "proton mass energy equivalent in MeV"; + unit_data(282).value = 938.272046; + unit_data(282).uncertainty = 0.000021; + unit_data(282).units = "MeV"; + + unit_data(283).name = "proton mass in u"; + unit_data(283).value = 1.007276466812; + unit_data(283).uncertainty = 0.000000000090; + unit_data(283).units = "u"; + + unit_data(284).name = "proton molar mass"; + unit_data(284).value = 1.007276466812e-3; + unit_data(284).uncertainty = 0.000000000090e-3; + unit_data(284).units ... [truncated message content] |
From: <car...@us...> - 2012-04-25 21:29:59
|
Revision: 10327 http://octave.svn.sourceforge.net/octave/?rev=10327&view=rev Author: carandraug Date: 2012-04-25 21:29:49 +0000 (Wed, 25 Apr 2012) Log Message: ----------- physicalconstants: update license to GPLv3+, do not load automatically and mention carn?\195?\171 Draug as function author (previous commit almost rewrote it) Modified Paths: -------------- trunk/octave-forge/main/physical-constants/COPYING trunk/octave-forge/main/physical-constants/DESCRIPTION trunk/octave-forge/main/physical-constants/NEWS Modified: trunk/octave-forge/main/physical-constants/COPYING =================================================================== --- trunk/octave-forge/main/physical-constants/COPYING 2012-04-25 21:25:31 UTC (rev 10326) +++ trunk/octave-forge/main/physical-constants/COPYING 2012-04-25 21:29:49 UTC (rev 10327) @@ -1,283 +1,625 @@ GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + Version 3, 29 June 2007 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. <http://fsf.org/> + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + The precise terms and conditions for copying, distribution and modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". + TERMS AND CONDITIONS -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. + 0. Definitions. - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. + "This License" refers to version 3 of the GNU General Public License. -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. + A "covered work" means either the unmodified Program or a work based +on the Program. - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: + 1. Source Code. - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. + The Corresponding Source for a work in source code form is that +same work. - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of this License. - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. + 13. Use with the GNU Affero General Public License. -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. + 14. Revised Versions of this License. - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. - NO WARRANTY + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. + 15. Disclaimer of Warranty. - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + END OF TERMS AND CONDITIONS - + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest @@ -286,15 +628,15 @@ To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least +state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> - This program is free software; you can redistribute it and/or modify + 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 2 of the License, or + 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, @@ -303,35 +645,30 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, see <http://www.gnu.org/licenses/>. + along with this program. If not, see <http://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<http://www.gnu.org/licenses/>. - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<http://www.gnu.org/philosophy/why-not-lgpl.html>. Modified: trunk/octave-forge/main/physical-constants/DESCRIPTION =================================================================== --- trunk/octave-forge/main/physical-constants/DESCRIPTION 2012-04-25 21:25:31 UTC (rev 10326) +++ trunk/octave-forge/main/physical-constants/DESCRIPTION 2012-04-25 21:29:49 UTC (rev 10327) @@ -1,12 +1,12 @@ Name: PhysicalConstants Version: 0.1.7 Date: 2009-05-06 -Author: Muthiah Annamalai <mut...@ut...> -Maintainer: Muthiah Annamalai <mut...@ut...> +Author: Muthiah Annamalai <mut...@ut...>, Carnë Draug <car...@gm...> +Maintainer: Octave-Forge community <oct...@li...> Title: Physical Constants Description: Physical Constants from Atomic & Molecular Physics, taken from NIST database Categories: Physics Depends: octave (>= 2.9.7) -Autoload: yes -License: GPL version 2 or later +Autoload: no +License: GPLv3+ Url: http://octave.sf.net Modified: trunk/octave-forge/main/physical-constants/NEWS =================================================================== --- trunk/octave-forge/main/physical-constants/NEWS 2012-04-25 21:25:31 UTC (rev 10326) +++ trunk/octave-forge/main/physical-constants/NEWS 2012-04-25 21:29:49 UTC (rev 10327) @@ -1,8 +1,15 @@ Summary of important user-visible changes for physicalconstants 1.0.0: ------------------------------------------------------------------- + ** VERY IMPORTANT: the physicalconstants package has been removed. Its + only function has been moved to the miscellaneous package. To avoid + transition problems, this new release is merely a dummy package + dependent on the new version of the miscellaneous package. + ** The values returned by `physical_constant' have been adjusted to the latest (2010) recommended values by CODATA. ** The function `physical_constant' has a new API and should also perform faster. + + ** Package is no longer automatically loaded. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-25 21:25:42
|
Revision: 10326 http://octave.svn.sourceforge.net/octave/?rev=10326&view=rev Author: carandraug Date: 2012-04-25 21:25:31 +0000 (Wed, 25 Apr 2012) Log Message: ----------- physicalconstant: * updated values for latest by CODATA * new python script to generate function that automatically downloads ascii table * fixed bug on python script due to new format of table * changed API of the function (new order of output and use of actual name as input instead of a modifed that caused some constnats to be removed (when only conditions changed, script would name them the same) * use built-in functions to search for match on strcuture array (faster search) Modified Paths: -------------- trunk/octave-forge/main/physical-constants/inst/physical_constant.m Added Paths: ----------- trunk/octave-forge/main/physical-constants/NEWS trunk/octave-forge/main/physical-constants/inst/physical_constant.py Removed Paths: ------------- trunk/octave-forge/main/physical-constants/gen.py Added: trunk/octave-forge/main/physical-constants/NEWS =================================================================== --- trunk/octave-forge/main/physical-constants/NEWS (rev 0) +++ trunk/octave-forge/main/physical-constants/NEWS 2012-04-25 21:25:31 UTC (rev 10326) @@ -0,0 +1,8 @@ +Summary of important user-visible changes for physicalconstants 1.0.0: +------------------------------------------------------------------- + + ** The values returned by `physical_constant' have been adjusted to the + latest (2010) recommended values by CODATA. + + ** The function `physical_constant' has a new API and should also + perform faster. Deleted: trunk/octave-forge/main/physical-constants/gen.py =================================================================== --- trunk/octave-forge/main/physical-constants/gen.py 2012-04-24 17:13:49 UTC (rev 10325) +++ trunk/octave-forge/main/physical-constants/gen.py 2012-04-25 21:25:31 UTC (rev 10326) @@ -1,325 +0,0 @@ -#! /usr/bin/python -## -## (C) 2007 Muthiah Annamalai -## -## 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 2 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; If not, see <http://www.gnu.org/licenses/>. -## -## This is the code generator that works on the NIST file. -## -## -import string -import time -import sys -from curses.ascii import * - -def make_oct_func(name,Description,Val,Units,Uncertainity,path): - sys.stdout=open(path + string.upper(name)+".m","w"); - print "## Copyright (C) 2007 Python Code Generator " - print "##" - print "## -- WARNING -- Autogenerated - DONOT EDIT -" - print "##" - print "## This code is released under GPL" - print """## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see - print "" - print "## -*- texinfo -*-" - print "## @deftypefn {Function File} [@var{Val},@var{unit},@var{uncertanity}] {} "+ \ - string.upper(name) + "() " - - Description = "Returns the "+Description; - while len(Description) > 0: - print "## %s"%(Description[:80]); - Description=Description[81:]; - print "## . Val="+Val + " Units="+Units+" Uncertanity="+Uncertainity+". " - print """## @var{Val} is actual value of the constant. -## @var{Unit} is a Units string. -## @var{uncertanity} is +/- value to constant.""" - print "##" - print "## Autogenerated on "+str(time.ctime()) - print "## from NIST database at http://physics.nist.gov/constants " - print "## @end deftypefn" - print "" - print """## Fundamental Physical Constants --- Complete Listing -## From: http://physics.nist.gov/constants -## Source: Peter J. Mohr and Barry N. Taylor, CODATA Recommended Values of the -## Fundamental Physical Constants: 2002, published in Rev. Mod. Phys. -## vol. 77(1) 1-107 (2005). -## Taken from: physics.nist.gov/cuu/Constants/Table/allascii.txt -## - """ - print "function [Val,Unit,Uncertanity]=%s()"%(string.upper(name)) - print "\t Val = %s; "%(Val) - print "\t Units = \"%s\";"%(Units) - print "\t Uncertanity = %s;"%(Uncertainity) - print "endfunction" - print "%" - print "%%!assert(%s,%s,eps)"%(string.upper(name),Val) - print "%" - sys.stdout.close() - return - -def make_physconst_func(func_metadata,PATH): - ostd=sys.stdout; - sys.stdout=open(PATH+'/physical_constant.m','w'); - print "## Copyright (C) 2007 Muthiah Annamalai " - print "##" - print "## --parts of code AUTOGENERATED. DONOT EDIT--" - print "## --DONOT EDIT--" - print "##" - print "## This code is released under GPL" - print """## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>.""" - print "" - print "## -*- texinfo -*-" - print "## @deftypefn {Function File} [@var{Val},@var{unit},@var{uncertanity},@var{desc},@var{name}] {} =physical_constant(@var{arg})" - print "## @var{arg} is the name of the physical constant to retrieve." - print "## The output arguments are the attributes which you need. " - print "## By default, the return value is the constant value." - print "## if no arguments are passed, depending on the output arguments the entire units structure is returned" - print """## @var{Val} is actual value of the constant. -## @var{Unit} is a Units string. -## @var{uncertanity} is +/- value to constant.""" - print "##" - print "## Autogenerated on "+str(time.ctime()) - print "## from NIST database at http://physics.nist.gov/constants " - print "## @end deftypefn" - print "" - print """## Fundamental Physical Constants --- Complete Listing -## From: http://physics.nist.gov/constants -## Source: Peter J. Mohr and Barry N. Taylor, CODATA Recommended Values of the -## Fundamental Physical Constants: 2002, published in Rev. Mod. Phys. -## vol. 77(1) 1-107 (2005). -## Taken from: physics.nist.gov/cuu/Constants/Table/allascii.txt -## - """ - - print "function [rval,unit,uncert,desc,name]=physical_constant(arg)" - print "" - print " persistent unit_data;" - print " if isstruct(unit_data) == 0 " - print " unit_data=struct();"; ## can we use persist smartly here? - - #func-name#'es => [Desc, Val,Units, Uncertanity] - k=1; - key_sorted=func_metadata.keys(); - key_sorted.sort(); - for key in key_sorted: - v=func_metadata[key]; #sort by name - print " unit_data( %d ).name=\"%s\";"%(k,key); - print " unit_data( %d ).description=\"%s\";"%(k,v[0]); - print " unit_data( %d ).value=%s;"%(k,v[1]); - print " unit_data( %d ).units=\"%s\";"%(k,v[2]); - print " unit_data( %d ).uncertanity=%s;"%(k,v[3]); - k=k+1; - print "" - print " end" - - print "" - print " if nargin < 1 " - print " rval=unit_data;" - print " return;" - print " end" - - #print " if nargin < 1" - #print " if (nargout <= 1)" - #print " rval=unit_data;" - #print " else" - #print " rval=unit_data.value;" - #print " end" - #print " if (nargout >= 2)" - #print " unit=unit_data.units" - #print " end" - #print " if (nargout >= 3)" - #print " uncert=unit_data.uncertanity;" - #print " end" - #print " if (nargout >= 4)" - #print " desc=unit_data.description;" - #print " end" - #print " if (nargout >= 5)" - #print " name=unit_data.name;" - #print " end" - #print " return;" - #print " end" - - print "" - print " matches=[]; pmatches=[];" - print " LN=length(arg);" - print " arg=toupper(arg);" - #print " for idx = 1:length(unit_data) %replace to binary search" - #print " if ( strcmp(arg,unit_data( idx ).name) == 1 )" - #print " matches=[matches, idx];" - #print " end" - #print " end" - print " %binary search" - print " low=1;high=length(unit_data);" - print " while ( low <= high ) " - print " idx=low+floor((high-low)/2);" - print " val=cstrcmp(unit_data( idx ).name,arg);" - print " if val == 0" - print " matches=[matches, idx];" - print " break;" - print " elseif val==-1" - print " low=idx+1;" - print " else %val ==+1"; - print " high=idx;" - print " end" - print " if ( idx == (low + high)/2 )" - print " warning(\"Cannot find a perfect-match for %s\",arg)" - print " break;" - print " end" - print " end" - print " if (length(matches) == 0) %search only when we dont have matches" - print " for idx = 1:length(unit_data)" - print " if ( strncmp(arg,unit_data( idx ).name,LN) == 1 )" - print " pmatches=[pmatches, idx];" - print " end" - print " end" - print " end" - print "" - print " matches = [matches, pmatches]; " - print " if (length(matches) >= 1)" - print " if (length(matches) == length(pmatches)) %Only partial matches exist" - print " warning(\" Includes partial matches. Picking first %s (1'st) match with units %s..." - print " by default for %s.\",unit_data(matches(1)).name,unit_data(matches(1)).units,arg)" - print " end" - print " match=unit_data(matches(1));" - print " rval=match.value;" - print " if (nargout >= 2)" - print " unit=match.units;" - print " end" - print " if (nargout >= 3)" - print " uncert=match.uncertanity;" - print " end" - print " if (nargout >= 4)" - print " desc=match.description;" - print " end" - print " if (nargout >= 5)" - print " name=match.name;" - print " end" - print " else" - print " error(\" No matches found\")"; - print " end" - print " return;" - print "end" - print "" - print "function v=cstrcmp(s1,s2)" - print " L2=length(s2);" - print " L1=length(s1);" - print " L=min(L1,L2);" - print " for idx=1:L" - print """ p=s1(idx); - q=s2(idx); - if ( p ~= q ) - v=sign(p-q); - return - end""" -# print " if s1(idx)!=s2(idx)" -# print " if ( s1(idx)>s2(idx) )" -# print " v=+1;" -# print " else" -# print " v=-1;" -# print " end" -# print " return" -# print " end" - print " end" - print " v=sign(L1-L2);" - print " return;" - print "end" - - ## tests - for key in key_sorted: - v=func_metadata[key]; - print "%%!assert( physical_constant( \"%s\" ),%s,eps);"%(key,v[1]) - - sys.stdout.close() - return - - -if __name__ == "__main__": - y=file("nist-allascii.txt"); - x=y.readlines()[14:]; ## skip first 14 lines. - y.close(); - - replace_dict={',':'_', - '/':'_per_', - '-':'_', - ' ':'_', - '.':'', - '_over_':'_by_', - '_relationship':''}; - uncert_dict={'(exact)':'0.0'}; - val_dict={' ':'', - '...':''} # . is decimal! - - PATH="./" #default path. - ostd=sys.stdout; - if len(sys.argv) > 1: - PATH=sys.argv[1]+"/"; - func_metadata={}; ## this is Python - for l in x: - ## serves like a comment. - Description=l[0:55].strip(); - - ## function name - name=Description; - - ## discard anything that dont have alphabets in beginning. - idx=0; - NLEN=len(name); - while ( idx < NLEN) and (not isalpha(name[idx])) : - idx=idx+1; - name=name[idx:] - - ## value - Val=l[55:77]; - - ## Uncertanity field - Uncertainity=l[77:77+22].strip().replace(" ","") - - ## create units. - Units=l[99:-1].strip() - - ## replace names. - if name.find("(") >= 0: - name=name.split('(')[0].strip() - for k,v in replace_dict.items(): - name=name.replace(k,v); - name=string.upper(name); - - ## replace uncertanity values - for k,v in val_dict.items(): - Val=Val.replace(k,v) - - ## replace uncertanity values - for k,v in uncert_dict.items(): - Uncertainity=Uncertainity.replace(k,v) - - ## call function - ##print "[%s],[%s],[%s],[%s]"%(name, Val, Uncertainity, Units) - ##make_oct_func(name,Description,Val,Units,Uncertainity,PATH) - ##sys.stdout=ostd - ##print string.upper(name) - - #func-name#'es => [Desc, Val,Units, Uncertanity] - func_metadata[name]=[Description,Val, Units, Uncertainity]; - - ##generate main file. - make_physconst_func(func_metadata,PATH); - - - - -##python ./gen.py > constants.m && octave -q constants.m -##octave -q --eval 'test physical_constant' Modified: trunk/octave-forge/main/physical-constants/inst/physical_constant.m =================================================================== --- trunk/octave-forge/main/physical-constants/inst/physical_constant.m 2012-04-24 17:13:49 UTC (rev 10325) +++ trunk/octave-forge/main/physical-constants/inst/physical_constant.m 2012-04-25 21:25:31 UTC (rev 10326) @@ -1,2263 +1,2078 @@ -## Copyright (C) 2007 Muthiah Annamalai +## Copyright (C) 2007 Muthiah Annamalai <mut...@ut...> +## Copyright (C) 2012 Carnë Draug <car...@gm...> ## -## --parts of code AUTOGENERATED. DONOT EDIT-- -## --DONOT EDIT-- +## 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 code is released under GPL -## You should have received a copy of the GNU General Public License -## along with this software; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. +## 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; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} [@var{Val},@var{unit},@var{uncertanity},@var{desc},@var{name}] {} =physical_constant(@var{arg}) -## @var{arg} is the name of the physical constant to retrieve. -## The output arguments are the attributes which you need. -## By default, the return value is the constant value. -## if no arguments are passed, depending on the output arguments the entire units structure is returned -## @var{Val} is actual value of the constant. -## @var{Unit} is a Units string. -## @var{uncertanity} is +/- value to constant. +## @deftypefn {Function File} {[@var{names}] =} physical_constant +## @deftypefnx {Function File} {[@var{val}, @var{uncertainty}, @var{unit}] =} physical_constant (@var{name}) +## @deftypefnx {Function File} {[@var{constants}] =} physical_constant ("all") +## Get physical constant @var{arg}. ## -## Autogenerated on Fri Feb 23 00:35:47 2007 -## from NIST database at http://physics.nist.gov/constants +## If no arguments are given, returns a cell array with all possible @var{name}s. +## Alternatively, @var{name} can be `all' in which case @var{val} is a structure +## array with 4 fields (name, value, uncertainty, units). +## +## Since the long list of values needs to be parsed on each call to this function +## it is much more efficient to store the values in a variable rather make multiple +## calls to this function with the same argument +## +## The values are the ones recommended by CODATA. This function was autogenerated +## on Wed Apr 25 22:17:07 2012 from NIST database at @uref{http://physics.nist.gov/constants} ## @end deftypefn -## Fundamental Physical Constants --- Complete Listing -## From: http://physics.nist.gov/constants -## Source: Peter J. Mohr and Barry N. Taylor, CODATA Recommended Values of the -## Fundamental Physical Constants: 2002, published in Rev. Mod. Phys. -## vol. 77(1) 1-107 (2005). -## Taken from: physics.nist.gov/cuu/Constants/Table/allascii.txt -## - -function [rval,unit,uncert,desc,name]=physical_constant(arg) +## DO NOT EDIT THIS FILE +## This function file is generated automatically by physical_constant.py - persistent unit_data; - if isstruct(unit_data) == 0 - unit_data=struct(); - unit_data( 1 ).name="ALPHA_PARTICLE_ELECTRON_MASS_RATIO"; - unit_data( 1 ).description="alpha particle-electron mass ratio"; - unit_data( 1 ).value=7294.2995363; - unit_data( 1 ).units=""; - unit_data( 1 ).uncertanity=0.0000032; +function [rval, uncert, unit] = physical_constant (arg) - unit_data( 2 ).name="ALPHA_PARTICLE_MASS"; - unit_data( 2 ).description="alpha particle mass"; - unit_data( 2 ).value=6.6446565e-27; - unit_data( 2 ).units="kg"; - unit_data( 2 ).uncertanity=0.0000011e-27; + persistent unit_data; + if (isempty(unit_data)) + unit_data = get_data; + endif - unit_data( 3 ).name="ALPHA_PARTICLE_MASS_ENERGY_EQUIVALENT"; - unit_data( 3 ).description="alpha particle mass energy equivalent"; - unit_data( 3 ).value=5.9719194e-10; - unit_data( 3 ).units="J"; - unit_data( 3 ).uncertanity=0.0000010e-10; + if (nargin > 1 || (nargin == 1 && !ischar (arg))) + print_usage; + elseif (nargin == 0) + rval = reshape ({unit_data(:).name}, size (unit_data)); + return + elseif (nargin == 1 && strcmpi (arg, "all")) + rval = unit_data; + return + endif - unit_data( 4 ).name="ALPHA_PARTICLE_MASS_ENERGY_EQUIVALENT_IN_MEV"; - unit_data( 4 ).description="alpha particle mass energy equivalent in MeV"; - unit_data( 4 ).value=3727.37917; - unit_data( 4 ).units="MeV"; - unit_data( 4 ).uncertanity=0.00032; + val = reshape ({unit_data(:).name}, size (unit_data)); + map = strcmpi (val, arg); + if (any (map)) + val = unit_data(map); + rval = val.value; + uncert = val.uncertainty; + unit = val.units; + else + error ("No constant with name '%s' found", arg) + endif +endfunction - unit_data( 5 ).name="ALPHA_PARTICLE_MASS_IN_U"; - unit_data( 5 ).description="alpha particle mass in u"; - unit_data( 5 ).value=4.001506179149; - unit_data( 5 ).units="u"; - unit_data( 5 ).uncertanity=0.000000000056; +function unit_data = get_data + unit_data(1).name = "Angstrom star"; + unit_data(1).value = 1.00001495e-10; + unit_data(1).uncertainty = 0.00000090e-10; + unit_data(1).units = "m"; - unit_data( 6 ).name="ALPHA_PARTICLE_MOLAR_MASS"; - unit_data( 6 ).description="alpha particle molar mass"; - unit_data( 6 ).value=4.001506179149e-3; - unit_data( 6 ).units="kg mol^-1"; - unit_data( 6 ).uncertanity=0.000000000056e-3; + unit_data(2).name = "Avogadro constant"; + unit_data(2).value = 6.02214129e23; + unit_data(2).uncertainty = 0.00000027e23; + unit_data(2).units = "mol^-1"; - unit_data( 7 ).name="ALPHA_PARTICLE_PROTON_MASS_RATIO"; - unit_data( 7 ).description="alpha particle-proton mass ratio"; - unit_data( 7 ).value=3.97259968907; - unit_data( 7 ).units=""; - unit_data( 7 ).uncertanity=0.00000000052; + unit_data(3).name = "Bohr magneton"; + unit_data(3).value = 927.400968e-26; + unit_data(3).uncertainty = 0.000020e-26; + unit_data(3).units = "J T^-1"; - unit_data( 8 ).name="ANGSTROM_STAR"; - unit_data( 8 ).description="Angstrom star"; - unit_data( 8 ).value=1.00001509e-10; - unit_data( 8 ).units="m"; - unit_data( 8 ).uncertanity=0.00000090e-10; + unit_data(4).name = "Bohr magneton in Hz/T"; + unit_data(4).value = 13.99624555e9; + unit_data(4).uncertainty = 0.00000031e9; + unit_data(4).units = "Hz T^-1"; - unit_data( 9 ).name="ATOMIC_MASS_CONSTANT"; - unit_data( 9 ).description="atomic mass constant"; - unit_data( 9 ).value=1.66053886e-27; - unit_data( 9 ).units="kg"; - unit_data( 9 ).uncertanity=0.00000028e-27; + unit_data(5).name = "Bohr magneton in K/T"; + unit_data(5).value = 0.67171388; + unit_data(5).uncertainty = 0.00000061; + unit_data(5).units = "K T^-1"; - unit_data( 10 ).name="ATOMIC_MASS_CONSTANT_ENERGY_EQUIVALENT"; - unit_data( 10 ).description="atomic mass constant energy equivalent"; - unit_data( 10 ).value=1.49241790e-10; - unit_data( 10 ).units="J"; - unit_data( 10 ).uncertanity=0.00000026e-10; + unit_data(6).name = "Bohr magneton in eV/T"; + unit_data(6).value = 5.7883818066e-5; + unit_data(6).uncertainty = 0.0000000038e-5; + unit_data(6).units = "eV T^-1"; - unit_data( 11 ).name="ATOMIC_MASS_CONSTANT_ENERGY_EQUIVALENT_IN_MEV"; - unit_data( 11 ).description="atomic mass constant energy equivalent in MeV"; - unit_data( 11 ).value=931.494043; - unit_data( 11 ).units="MeV"; - unit_data( 11 ).uncertanity=0.000080; + unit_data(7).name = "Bohr magneton in inverse meters per tesla"; + unit_data(7).value = 46.6864498; + unit_data(7).uncertainty = 0.0000010; + unit_data(7).units = "m^-1 T^-1"; - unit_data( 12 ).name="ATOMIC_MASS_UNIT_ELECTRON_VOLT"; - unit_data( 12 ).description="atomic mass unit-electron volt relationship"; - unit_data( 12 ).value=931.494043e6; - unit_data( 12 ).units="eV"; - unit_data( 12 ).uncertanity=0.000080e6; + unit_data(8).name = "Bohr radius"; + unit_data(8).value = 0.52917721092e-10; + unit_data(8).uncertainty = 0.00000000017e-10; + unit_data(8).units = "m"; - unit_data( 13 ).name="ATOMIC_MASS_UNIT_HARTREE"; - unit_data( 13 ).description="atomic mass unit-hartree relationship"; - unit_data( 13 ).value=3.423177686e7; - unit_data( 13 ).units="E_h"; - unit_data( 13 ).uncertanity=0.000000023e7; + unit_data(9).name = "Boltzmann constant"; + unit_data(9).value = 1.3806488e-23; + unit_data(9).uncertainty = 0.0000013e-23; + unit_data(9).units = "J K^-1"; - unit_data( 14 ).name="ATOMIC_MASS_UNIT_HERTZ"; - unit_data( 14 ).description="atomic mass unit-hertz relationship"; - unit_data( 14 ).value=2.252342718e23; - unit_data( 14 ).units="Hz"; - unit_data( 14 ).uncertanity=0.000000015e23; + unit_data(10).name = "Boltzmann constant in Hz/K"; + unit_data(10).value = 2.0836618e10; + unit_data(10).uncertainty = 0.0000019e10; + unit_data(10).units = "Hz K^-1"; - unit_data( 15 ).name="ATOMIC_MASS_UNIT_INVERSE_METER"; - unit_data( 15 ).description="atomic mass unit-inverse meter relationship"; - unit_data( 15 ).value=7.513006608e14; - unit_data( 15 ).units="m^-1"; - unit_data( 15 ).uncertanity=0.000000050e14; + unit_data(11).name = "Boltzmann constant in eV/K"; + unit_data(11).value = 8.6173324e-5; + unit_data(11).uncertainty = 0.0000078e-5; + unit_data(11).units = "eV K^-1"; - unit_data( 16 ).name="ATOMIC_MASS_UNIT_JOULE"; - unit_data( 16 ).description="atomic mass unit-joule relationship"; - unit_data( 16 ).value=1.49241790e-10; - unit_data( 16 ).units="J"; - unit_data( 16 ).uncertanity=0.00000026e-10; + unit_data(12).name = "Boltzmann constant in inverse meters per kelvin"; + unit_data(12).value = 69.503476; + unit_data(12).uncertainty = 0.000063; + unit_data(12).units = "m^-1 K^-1"; - unit_data( 17 ).name="ATOMIC_MASS_UNIT_KELVIN"; - unit_data( 17 ).description="atomic mass unit-kelvin relationship"; - unit_data( 17 ).value=1.0809527e13; - unit_data( 17 ).units="K"; - unit_data( 17 ).uncertanity=0.0000019e13; + unit_data(13).name = "Compton wavelength"; + unit_data(13).value = 2.4263102389e-12; + unit_data(13).uncertainty = 0.0000000016e-12; + unit_data(13).units = "m"; - unit_data( 18 ).name="ATOMIC_MASS_UNIT_KILOGRAM"; - unit_data( 18 ).description="atomic mass unit-kilogram relationship"; - unit_data( 18 ).value=1.66053886e-27; - unit_data( 18 ).units="kg"; - unit_data( 18 ).uncertanity=0.00000028e-27; + unit_data(14).name = "Compton wavelength over 2 pi"; + unit_data(14).value = 386.15926800e-15; + unit_data(14).uncertainty = 0.00000025e-15; + unit_data(14).units = "m"; - unit_data( 19 ).name="ATOMIC_UNIT_OF_1ST_HYPERPOLARIZABLITY"; - unit_data( 19 ).description="atomic unit of 1st hyperpolarizablity"; - unit_data( 19 ).value=3.20636151e-53; - unit_data( 19 ).units="C^3 m^3 J^-2"; - unit_data( 19 ).uncertanity=0.00000028e-53; + unit_data(15).name = "Cu x unit"; + unit_data(15).value = 1.00207697e-13; + unit_data(15).uncertainty = 0.00000028e-13; + unit_data(15).units = "m"; - unit_data( 20 ).name="ATOMIC_UNIT_OF_2ND_HYPERPOLARIZABLITY"; - unit_data( 20 ).description="atomic unit of 2nd hyperpolarizablity"; - unit_data( 20 ).value=6.2353808e-65; - unit_data( 20 ).units="C^4 m^4 J^-3"; - unit_data( 20 ).uncertanity=0.0000011e-65; + unit_data(16).name = "Faraday constant"; + unit_data(16).value = 96485.3365; + unit_data(16).uncertainty = 0.0021; + unit_data(16).units = "C mol^-1"; - unit_data( 21 ).name="ATOMIC_UNIT_OF_ACTION"; - unit_data( 21 ).description="atomic unit of action"; - unit_data( 21 ).value=1.05457168e-34; - unit_data( 21 ).units="J s"; - unit_data( 21 ).uncertanity=0.00000018e-34; + unit_data(17).name = "Faraday constant for conventional electric current"; + unit_data(17).value = 96485.3321; + unit_data(17).uncertainty = 0.0043; + unit_data(17).units = "C_90 mol^-1"; - unit_data( 22 ).name="ATOMIC_UNIT_OF_CHARGE"; - unit_data( 22 ).description="atomic unit of charge"; - unit_data( 22 ).value=1.60217653e-19; - unit_data( 22 ).units="C"; - unit_data( 22 ).uncertanity=0.00000014e-19; + unit_data(18).name = "Fermi coupling constant"; + unit_data(18).value = 1.166364e-5; + unit_data(18).uncertainty = 0.000005e-5; + unit_data(18).units = "GeV^-2"; - unit_data( 23 ).name="ATOMIC_UNIT_OF_CHARGE_DENSITY"; - unit_data( 23 ).description="atomic unit of charge density"; - unit_data( 23 ).value=1.081202317e12; - unit_data( 23 ).units="C m^-3"; - unit_data( 23 ).uncertanity=0.000000093e12; + unit_data(19).name = "Hartree energy"; + unit_data(19).value = 4.35974434e-18; + unit_data(19).uncertainty = 0.00000019e-18; + unit_data(19).units = "J"; - unit_data( 24 ).name="ATOMIC_UNIT_OF_CURRENT"; - unit_data( 24 ).description="atomic unit of current"; - unit_data( 24 ).value=6.62361782e-3; - unit_data( 24 ).units="A"; - unit_data( 24 ).uncertanity=0.00000057e-3; + unit_data(20).name = "Hartree energy in eV"; + unit_data(20).value = 27.21138505; + unit_data(20).uncertainty = 0.00000060; + unit_data(20).units = "eV"; - unit_data( 25 ).name="ATOMIC_UNIT_OF_ELECTRIC_DIPOLE_MOMENT"; - unit_data( 25 ).description="atomic unit of electric dipole moment"; - unit_data( 25 ).value=8.47835309e-30; - unit_data( 25 ).units="C m"; - unit_data( 25 ).uncertanity=0.00000073e-30; + unit_data(21).name = "Josephson constant"; + unit_data(21).value = 483597.870e9; + unit_data(21).uncertainty = 0.011e9; + unit_data(21).units = "Hz V^-1"; - unit_data( 26 ).name="ATOMIC_UNIT_OF_ELECTRIC_FIELD"; - unit_data( 26 ).description="atomic unit of electric field"; - unit_data( 26 ).value=5.14220642e11; - unit_data( 26 ).units="V m^-1"; - unit_data( 26 ).uncertanity=0.00000044e11; + unit_data(22).name = "Loschmidt constant (273.15 K, 100 kPa)"; + unit_data(22).value = 2.6516462e25; + unit_data(22).uncertainty = 0.0000024e25; + unit_data(22).units = "m^-3"; - unit_data( 27 ).name="ATOMIC_UNIT_OF_ELECTRIC_FIELD_GRADIENT"; - unit_data( 27 ).description="atomic unit of electric field gradient"; - unit_data( 27 ).value=9.71736182e21; - unit_data( 27 ).units="V m^-2"; - unit_data( 27 ).uncertanity=0.00000083e21; + unit_data(23).name = "Loschmidt constant (273.15 K, 101.325 kPa)"; + unit_data(23).value = 2.6867805e25; + unit_data(23).uncertainty = 0.0000024e25; + unit_data(23).units = "m^-3"; - unit_data( 28 ).name="ATOMIC_UNIT_OF_ELECTRIC_POLARIZABLITY"; - unit_data( 28 ).description="atomic unit of electric polarizablity"; - unit_data( 28 ).value=1.648777274e-41; - unit_data( 28 ).units="C^2 m^2 J^-1"; - unit_data( 28 ).uncertanity=0.000000016e-41; + unit_data(24).name = "Mo x unit"; + unit_data(24).value = 1.00209952e-13; + unit_data(24).uncertainty = 0.00000053e-13; + unit_data(24).units = "m"; - unit_data( 29 ).name="ATOMIC_UNIT_OF_ELECTRIC_POTENTIAL"; - unit_data( 29 ).description="atomic unit of electric potential"; - unit_data( 29 ).value=27.2113845; - unit_data( 29 ).units="V"; - unit_data( 29 ).uncertanity=0.0000023; + unit_data(25).name = "Newtonian constant of gravitation"; + unit_data(25).value = 6.67384e-11; + unit_data(25).uncertainty = 0.00080e-11; + unit_data(25).units = "m^3 kg^-1 s^-2"; - unit_data( 30 ).name="ATOMIC_UNIT_OF_ELECTRIC_QUADRUPOLE_MOMENT"; - unit_data( 30 ).description="atomic unit of electric quadrupole moment"; - unit_data( 30 ).value=4.48655124e-40; - unit_data( 30 ).units="C m^2"; - unit_data( 30 ).uncertanity=0.00000039e-40; + unit_data(26).name = "Newtonian constant of gravitation over h-bar c"; + unit_data(26).value = 6.70837e-39; + unit_data(26).uncertainty = 0.00080e-39; + unit_data(26).units = "(GeV/c^2)^-2"; - unit_data( 31 ).name="ATOMIC_UNIT_OF_ENERGY"; - unit_data( 31 ).description="atomic unit of energy"; - unit_data( 31 ).value=4.35974417e-18; - unit_data( 31 ).units="J"; - unit_data( 31 ).uncertanity=0.00000075e-18; + unit_data(27).name = "Planck constant"; + unit_data(27).value = 6.62606957e-34; + unit_data(27).uncertainty = 0.00000029e-34; + unit_data(27).units = "J s"; - unit_data( 32 ).name="ATOMIC_UNIT_OF_FORCE"; - unit_data( 32 ).description="atomic unit of force"; - unit_data( 32 ).value=8.2387225e-8; - unit_data( 32 ).units="N"; - unit_data( 32 ).uncertanity=0.0000014e-8; + unit_data(28).name = "Planck constant in eV s"; + unit_data(28).value = 4.135667516e-15; + unit_data(28).uncertainty = 0.000000091e-15; + unit_data(28).units = "eV s"; - unit_data( 33 ).name="ATOMIC_UNIT_OF_LENGTH"; - unit_data( 33 ).description="atomic unit of length"; - unit_data( 33 ).value=0.5291772108e-10; - unit_data( 33 ).units="m"; - unit_data( 33 ).uncertanity=0.0000000018e-10; + unit_data(29).name = "Planck constant over 2 pi"; + unit_data(29).value = 1.054571726e-34; + unit_data(29).uncertainty = 0.000000047e-34; + unit_data(29).units = "J s"; - unit_data( 34 ).name="ATOMIC_UNIT_OF_MAGNETIZABILITY"; - unit_data( 34 ).description="atomic unit of magnetizability"; - unit_data( 34 ).value=7.89103660e-29; - unit_data( 34 ).units="J T^-2"; - unit_data( 34 ).uncertanity=0.00000013e-29; + unit_data(30).name = "Planck constant over 2 pi in eV s"; + unit_data(30).value = 6.58211928e-16; + unit_data(30).uncertainty = 0.00000015e-16; + unit_data(30).units = "eV s"; - unit_data( 35 ).name="ATOMIC_UNIT_OF_MAGN_DIPOLE_MOMENT"; - unit_data( 35 ).description="atomic unit of magn. dipole moment"; - unit_data( 35 ).value=1.85480190e-23; - unit_data( 35 ).units="J T^-1"; - unit_data( 35 ).uncertanity=0.00000016e-23; + unit_data(31).name = "Planck constant over 2 pi times c in MeV fm"; + unit_data(31).value = 197.3269718; + unit_data(31).uncertainty = 0.0000044; + unit_data(31).units = "MeV fm"; - unit_data( 36 ).name="ATOMIC_UNIT_OF_MAGN_FLUX_DENSITY"; - unit_data( 36 ).description="atomic unit of magn. flux density"; - unit_data( 36 ).value=2.35051742e5; - unit_data( 36 ).units="T"; - unit_data( 36 ).uncertanity=0.00000020e5; + unit_data(32).name = "Planck length"; + unit_data(32).value = 1.616199e-35; + unit_data(32).uncertainty = 0.000097e-35; + unit_data(32).units = "m"; - unit_data( 37 ).name="ATOMIC_UNIT_OF_MASS"; - unit_data( 37 ).description="atomic unit of mass"; - unit_data( 37 ).value=9.1093826e-31; - unit_data( 37 ).units="kg"; - unit_data( 37 ).uncertanity=0.0000016e-31; + unit_data(33).name = "Planck mass"; + unit_data(33).value = 2.17651e-8; + unit_data(33).uncertainty = 0.00013e-8; + unit_data(33).units = "kg"; - unit_data( 38 ).name="ATOMIC_UNIT_OF_MOMENTUM"; - unit_data( 38 ).description="atomic unit of momentum"; - unit_data( 38 ).value=1.99285166e-24; - unit_data( 38 ).units="kg m s^-1"; - unit_data( 38 ).uncertanity=0.00000034e-24; + unit_data(34).name = "Planck mass energy equivalent in GeV"; + unit_data(34).value = 1.220932e19; + unit_data(34).uncertainty = 0.000073e19; + unit_data(34).units = "GeV"; - unit_data( 39 ).name="ATOMIC_UNIT_OF_PERMITTIVITY"; - unit_data( 39 ).description="atomic unit of permittivity"; - unit_data( 39 ).value=1.112650056e-10; - unit_data( 39 ).units="F m^-1"; - unit_data( 39 ).uncertanity=0.0; + unit_data(35).name = "Planck temperature"; + unit_data(35).value = 1.416833e32; + unit_data(35).uncertainty = 0.000085e32; + unit_data(35).units = "K"; - unit_data( 40 ).name="ATOMIC_UNIT_OF_TIME"; - unit_data( 40 ).description="atomic unit of time"; - unit_data( 40 ).value=2.418884326505e-17; - unit_data( 40 ).units="s"; - unit_data( 40 ).uncertanity=0.000000000016e-17; + unit_data(36).name = "Planck time"; + unit_data(36).value = 5.39106e-44; + unit_data(36).uncertainty = 0.00032e-44; + unit_data(36).units = "s"; - unit_data( 41 ).name="ATOMIC_UNIT_OF_VELOCITY"; - unit_data( 41 ).description="atomic unit of velocity"; - unit_data( 41 ).value=2.1876912633e6; - unit_data( 41 ).units="m s^-1"; - unit_data( 41 ).uncertanity=0.0000000073e6; + unit_data(37).name = "Rydberg constant"; + unit_data(37).value = 10973731.568539; + unit_data(37).uncertainty = 0.000055; + unit_data(37).units = "m^-1"; - unit_data( 42 ).name="AVOGADRO_CONSTANT"; - unit_data( 42 ).description="Avogadro constant"; - unit_data( 42 ).value=6.0221415e23; - unit_data( 42 ).units="mol^-1"; - unit_data( 42 ).uncertanity=0.0000010e23; + unit_data(38).name = "Rydberg constant times c in Hz"; + unit_data(38).value = 3.289841960364e15; + unit_data(38).uncertainty = 0.000000000017e15; + unit_data(38).units = "Hz"; - unit_data( 43 ).name="BOHR_MAGNETON"; - unit_data( 43 ).description="Bohr magneton"; - unit_data( 43 ).value=927.400949e-26; - unit_data( 43 ).units="J T^-1"; - unit_data( 43 ).uncertanity=0.000080e-26; + unit_data(39).name = "Rydberg constant times hc in J"; + unit_data(39).value = 2.179872171e-18; + unit_data(39).uncertainty = 0.000000096e-18; + unit_data(39).units = "J"; - unit_data( 44 ).name="BOHR_MAGNETON_IN_EV_PER_T"; - unit_data( 44 ).description="Bohr magneton in eV/T"; - unit_data( 44 ).value=5.788381804e-5; - unit_data( 44 ).units="eV T^-1"; - unit_data( 44 ).uncertanity=0.000000039e-5; + unit_data(40).name = "Rydberg constant times hc in eV"; + unit_data(40).value = 13.60569253; + unit_data(40).uncertainty = 0.00000030; + unit_data(40).units = "eV"; - unit_data( 45 ).name="BOHR_MAGNETON_IN_HZ_PER_T"; - unit_data( 45 ).description="Bohr magneton in Hz/T"; - unit_data( 45 ).value=13.9962458e9; - unit_data( 45 ).units="Hz T^-1"; - unit_data( 45 ).uncertanity=0.0000012e9; + unit_data(41).name = "Sackur-Tetrode constant (1 K, 100 kPa)"; + unit_data(41).value = -1.1517078; + unit_data(41).uncertainty = 0.0000023; + unit_data(41).units = ""; - unit_data( 46 ).name="BOHR_MAGNETON_IN_INVERSE_METERS_PER_TESLA"; - unit_data( 46 ).description="Bohr magneton in inverse meters per tesla"; - unit_data( 46 ).value=46.6864507; - unit_data( 46 ).units="m^-1 T^-1"; - unit_data( 46 ).uncertanity=0.0000040; + unit_data(42).name = "Sackur-Tetrode constant (1 K, 101.325 kPa)"; + unit_data(42).value = -1.1648708; + unit_data(42).uncertainty = 0.0000023; + unit_data(42).units = ""; - unit_data( 47 ).name="BOHR_MAGNETON_IN_K_PER_T"; - unit_data( 47 ).description="Bohr magneton in K/T"; - unit_data( 47 ).value=0.6717131; - unit_data( 47 ).units="K T^-1"; - unit_data( 47 ).uncertanity=0.0000012; + unit_data(43).name = "Stefan-Boltzmann constant"; + unit_data(43).value = 5.670373e-8; + unit_data(43).uncertainty = 0.000021e-8; + unit_data(43).units = "W m^-2 K^-4"; - unit_data( 48 ).name="BOHR_RADIUS"; - unit_data( 48 ).description="Bohr radius"; - unit_data( 48 ).value=0.5291772108e-10; - unit_data( 48 ).units="m"; - unit_data( 48 ).uncertanity=0.0000000018e-10; + unit_data(44).name = "Thomson cross section"; + unit_data(44).value = 0.6652458734e-28; + unit_data(44).uncertainty = 0.0000000013e-28; + unit_data(44).units = "m^2"; - unit_data( 49 ).name="BOLTZMANN_CONSTANT"; - unit_data( 49 ).description="Boltzmann constant"; - unit_data( 49 ).value=1.3806505e-23; - unit_data( 49 ).units="J K^-1"; - unit_data( 49 ).uncertanity=0.0000024e-23; + unit_data(45).name = "Wien frequency displacement law constant"; + unit_data(45).value = 5.8789254e10; + unit_data(45).uncertainty = 0.0000053e10; + unit_data(45).units = "Hz K^-1"; - unit_data( 50 ).name="BOLTZMANN_CONSTANT_IN_EV_PER_K"; - unit_data( 50 ).description="Boltzmann constant in eV/K"; - unit_data( 50 ).value=8.617343e-5; - unit_data( 50 ).units="eV K^-1"; - unit_data( 50 ).uncertanity=0.000015e-5; + unit_data(46).name = "Wien wavelength displacement law constant"; + unit_data(46).value = 2.8977721e-3; + unit_data(46).uncertainty = 0.0000026e-3; + unit_data(46).units = "m K"; - unit_data( 51 ).name="BOLTZMANN_CONSTANT_IN_HZ_PER_K"; - unit_data( 51 ).description="Boltzmann constant in Hz/K"; - unit_data( 51 ).value=2.0836644e10; - unit_data( 51 ).units="Hz K^-1"; - unit_data( 51 ).uncertanity=0.0000036e10; + unit_data(47).name = "alpha particle mass"; + unit_data(47).value = 6.64465675e-27; + unit_data(47).uncertainty = 0.00000029e-27; + unit_data(47).units = "kg"; - unit_data( 52 ).name="BOLTZMANN_CONSTANT_IN_INVERSE_METERS_PER_KELVIN"; - unit_data( 52 ).description="Boltzmann constant in inverse meters per kelvin"; - unit_data( 52 ).value=69.50356; - unit_data( 52 ).units="m^-1 K^-1"; - unit_data( 52 ).uncertanity=0.00012; + unit_data(48).name = "alpha particle mass energy equivalent"; + unit_data(48).value = 5.97191967e-10; + unit_data(48).uncertainty = 0.00000026e-10; + unit_data(48).units = "J"; - unit_data( 53 ).name="CHARACTERISTIC_IMPEDANCE_OF_VACUUM"; - unit_data( 53 ).description="characteristic impedance of vacuum"; - unit_data( 53 ).value=376.730313461; - unit_data( 53 ).units="ohm"; - unit_data( 53 ).uncertanity=0.0; + unit_data(49).name = "alpha particle mass energy equivalent in MeV"; + unit_data(49).value = 3727.379240; + unit_data(49).uncertainty = 0.000082; + unit_data(49).units = "MeV"; - unit_data( 54 ).name="CLASSICAL_ELECTRON_RADIUS"; - unit_data( 54 ).description="classical electron radius"; - unit_data( 54 ).value=2.817940325e-15; - unit_data( 54 ).units="m"; - unit_data( 54 ).uncertanity=0.000000028e-15; + unit_data(50).name = "alpha particle mass in u"; + unit_data(50).value = 4.001506179125; + unit_data(50).uncertainty = 0.000000000062; + unit_data(50).units = "u"; - unit_data( 55 ).name="COMPTON_WAVELENGTH"; - unit_data( 55 ).description="Compton wavelength"; - unit_data( 55 ).value=2.426310238e-12; - unit_data( 55 ).units="m"; - unit_data( 55 ).uncertanity=0.000000016e-12; + unit_data(51).name = "alpha particle molar mass"; + unit_data(51).value = 4.001506179125e-3; + unit_data(51).uncertainty = 0.000000000062e-3; + unit_data(51).units = "kg mol^-1"; - unit_data( 56 ).name="COMPTON_WAVELENGTH_BY_2_PI"; - unit_data( 56 ).description="Compton wavelength over 2 pi"; - unit_data( 56 ).value=386.1592678e-15; - unit_data( 56 ).units="m"; - unit_data( 56 ).uncertanity=0.0000026e-15; + unit_data(52).name = "alpha particle-electron mass ratio"; + unit_data(52).value = 7294.2995361; + unit_data(52).uncertainty = 0.0000029; + unit_data(52).units = ""; - unit_data( 57 ).name="CONDUCTANCE_QUANTUM"; - unit_data( 57 ).description="conductance quantum"; - unit_data( 57 ).value=7.748091733e-5; - unit_data( 57 ).units="S"; - unit_data( 57 ).uncertanity=0.000000026e-5; + unit_data(53).name = "alpha particle-proton mass ratio"; + unit_data(53).value = 3.97259968933; + unit_data(53).uncertainty = 0.00000000036; + unit_data(53).units = ""; - unit_data( 58 ).name="CONVENTIONAL_VALUE_OF_JOSEPHSON_CONSTANT"; - unit_data( 58 ).description="conventional value of Josephson constant"; - unit_data( 58 ).value=483597.9e9; - unit_data( 58 ).units="Hz V^-1"; - unit_data( 58 ).uncertanity=0.0; + unit_data(54).name = "atomic mass constant"; + unit_data(54).value = 1.660538921e-27; + unit_data(54).uncertainty = 0.000000073e-27; + unit_data(54).units = "kg"; - unit_data( 59 ).name="CONVENTIONAL_VALUE_OF_VON_KLITZING_CONSTANT"; - unit_data( 59 ).description="conventional value of von Klitzing constant"; - unit_data( 59 ).value=25812.807; - unit_data( 59 ).units="ohm"; - unit_data( 59 ).uncertanity=0.0; + unit_data(55).name = "atomic mass constant energy equivalent"; + unit_data(55).value = 1.492417954e-10; + unit_data(55).uncertainty = 0.000000066e-10; + unit_data(55).units = "J"; - unit_data( 60 ).name="CU_X_UNIT"; - unit_data( 60 ).description="Cu x unit"; - unit_data( 60 ).value=1.00207710e-13; - unit_data( 60 ).units="m"; - unit_data( 60 ).uncertanity=0.00000029e-13; + unit_data(56).name = "atomic mass constant energy equivalent in MeV"; + unit_data(56).value = 931.494061; + unit_data(56).uncertainty = 0.000021; + unit_data(56).units = "MeV"; - unit_data( 61 ).name="DEUTERON_ELECTRON_MAGN_MOMENT_RATIO"; - unit_data( 61 ).description="deuteron-electron magn. moment ratio"; - unit_data( 61 ).value=-4.664345548e-4; - unit_data( 61 ).units=""; - unit_data( 61 ).uncertanity=0.000000050e-4; + unit_data(57).name = "atomic mass unit-electron volt relationship"; + unit_data(57).value = 931.494061e6; + unit_data(57).uncertainty = 0.000021e6; + unit_data(57).units = "eV"; - unit_data( 62 ).name="DEUTERON_ELECTRON_MASS_RATIO"; - unit_data( 62 ).description="deuteron-electron mass ratio"; - unit_data( 62 ).value=3670.4829652; - unit_data( 62 ).units=""; - unit_data( 62 ).uncertanity=0.0000018; + unit_data(58).name = "atomic mass unit-hartree relationship"; + unit_data(58).value = 3.4231776845e7; + unit_data(58).uncertainty = 0.0000000024e7; + unit_data(58).units = "E_h"; - unit_data( 63 ).name="DEUTERON_MAGN_MOMENT"; - unit_data( 63 ).description="deuteron magn. moment"; - unit_data( 63 ).value=0.433073482e-26; - unit_data( 63 ).units="J T^-1"; - unit_data( 63 ).uncertanity=0.000000038e-26; + unit_data(59).name = "atomic mass unit-hertz relationship"; + unit_data(59).value = 2.2523427168e23; + unit_data(59).uncertainty = 0.0000000016e23; + unit_data(59).units = "Hz"; - unit_data( 64 ).name="DEUTERON_MAGN_MOMENT_TO_BOHR_MAGNETON_RATIO"; - unit_data( 64 ).description="deuteron magn. moment to Bohr magneton ratio"; - unit_data( 64 ).value=0.4669754567e-3; - unit_data( 64 ).units=""; - unit_data( 64 ).uncertanity=0.0000000050e-3; + unit_data(60).name = "atomic mass unit-inverse meter relationship"; + unit_data(60).value = 7.5130066042e14; + unit_data(60).uncertainty = 0.0000000053e14; + unit_data(60).units = "m^-1"; - unit_data( 65 ).name="DEUTERON_MAGN_MOMENT_TO_NUCLEAR_MAGNETON_RATIO"; - unit_data( 65 ).description="deuteron magn. moment to nuclear magneton ratio"; - unit_data( 65 ).value=0.8574382329; - unit_data( 65 ).units=""; - unit_data( 65 ).uncertanity=0.0000000092; + unit_data(61).name = "atomic mass unit-joule relationship"; + unit_data(61).value = 1.492417954e-10; + unit_data(61).uncertainty = 0.000000066e-10; + unit_data(61).units = "J"; - unit_data( 66 ).name="DEUTERON_MASS"; - unit_data( 66 ).description="deuteron mass"; - unit_data( 66 ).value=3.34358335e-27; - unit_data( 66 ).units="kg"; - unit_data( 66 ).uncertanity=0.00000057e-27; + unit_data(62).name = "atomic mass unit-kelvin relationship"; + unit_data(62).value = 1.08095408e13; + unit_data(62).uncertainty = 0.00000098e13; + unit_data(62).units = "K"; - unit_data( 67 ).name="DEUTERON_MASS_ENERGY_EQUIVALENT"; - unit_data( 67 ).description="deuteron mass energy equivalent"; - unit_data( 67 ).value=3.00506285e-10; - unit_data( 67 ).units="J"; - unit_data( 67 ).uncertanity=0.00000051e-10; + unit_data(63).name = "atomic mass unit-kilogram relationship"; + unit_data(63).value = 1.660538921e-27; + unit_data(63).uncertainty = 0.000000073e-27; + unit_data(63).units = "kg"; - unit_data( 68 ).name="DEUTERON_MASS_ENERGY_EQUIVALENT_IN_MEV"; - unit_data( 68 ).description="deuteron mass energy equivalent in MeV"; - unit_data( 68 ).value=1875.61282; - unit_data( 68 ).units="MeV"; - unit_data( 68 ).uncertanity=0.00016; + unit_data(64).name = "atomic unit of 1st hyperpolarizability"; + unit_data(64).value = 3.206361449e-53; + unit_data(64).uncertainty = 0.000000071e-53; + unit_data(64).units = "C^3 m^3 J^-2"; - unit_data( 69 ).name="DEUTERON_MASS_IN_U"; - unit_data( 69 ).description="deuteron mass in u"; - unit_data( 69 ).value=2.01355321270; - unit_data( 69 ).units="u"; - unit_data( 69 ).uncertanity=0.00000000035; + unit_data(65).name = "atomic unit of 2nd hyperpolarizability"; + unit_data(65).value = 6.23538054e-65; + unit_data(65).uncertainty = 0.00000028e-65; + unit_data(65).units = "C^4 m^4 J^-3"; - unit_data( 70 ).name="DEUTERON_MOLAR_MASS"; - unit_data( 70 ).description="deuteron molar mass"; - unit_data( 70 ).value=2.01355321270e-3; - unit_data( 70 ).units="kg mol^-1"; - unit_data( 70 ).uncertanity=0.00000000035e-3; + unit_data(66).name = "atomic unit of action"; + unit_data(66).value = 1.054571726e-34; + unit_data(66).uncertainty = 0.000000047e-34; + unit_data(66).units = "J s"; - unit_data( 71 ).name="DEUTERON_NEUTRON_MAGN_MOMENT_RATIO"; - unit_data( 71 ).description="deuteron-neutron magn. moment ratio"; - unit_data( 71 ).value=-0.44820652; - unit_data( 71 ).units=""; - unit_data( 71 ).uncertanity=0.00000011; + unit_data(67).name = "atomic unit of charge"; + unit_data(67).value = 1.602176565e-19; + unit_data(67).uncertainty = 0.000000035e-19; + unit_data(67).units = "C"; - unit_data( 72 ).name="DEUTERON_PROTON_MAGN_MOMENT_RATIO"; - unit_data( 72 ).description="deuteron-proton magn. moment ratio"; - unit_data( 72 ).value=0.3070122084; - unit_data( 72 ).units=""; - unit_data( 72 ).uncertanity=0.0000000045; + unit_data(68).name = "atomic unit of charge density"; + unit_data(68).value = 1.081202338e12; + unit_data(68).uncertainty = 0.000000024e12; + unit_data(68).units = "C m^-3"; - unit_data( 73 ).name="DEUTERON_PROTON_MASS_RATIO"; - unit_data( 73 ).description="deuteron-proton mass ratio"; - unit_data( 73 ).value=1.99900750082; - unit_data( 73 ).units=""; - unit_data( 73 ).uncertanity=0.00000000041; + unit_data(69).name = "atomic unit of current"; + unit_data(69).value = 6.62361795e-3; + unit_data(69).uncertainty = 0.00000015e-3; + unit_data(69).units = "A"; - unit_data( 74 ).name="DEUTERON_RMS_CHARGE_RADIUS"; - unit_data( 74 ).description="deuteron rms charge radius"; - unit_data( 74 ).value=2.1394e-15; - unit_data( 74 ).units="m"; - unit_data( 74 ).uncertanity=0.0028e-15; + unit_data(70).name = "atomic unit of electric dipole mom."; + unit_data(70).value = 8.47835326e-30; + unit_data(70).uncertainty = 0.00000019e-30; + unit_data(70).units = "C m"; - unit_data( 75 ).name="ELECTRIC_CONSTANT"; - unit_data( 75 ).description="electric constant"; - unit_data( 75 ).value=8.854187817e-12; - unit_data( 75 ).units="F m^-1"; - unit_data( 75 ).uncertanity=0.0; + unit_data(71).name = "atomic unit of electric field"; + unit_data(71).value = 5.14220652e11; + unit_data(71).uncertainty = 0.00000011e11; + unit_data(71).units = "V m^-1"; - unit_data( 76 ).name="ELECTRON_CHARGE_TO_MASS_QUOTIENT"; - unit_data( 76 ).description="electron charge to mass quotient"; - unit_data( 76 ).value=-1.75882012e11; - unit_data( 76 ).units="C kg^-1"; - unit_data( 76 ).uncertanity=0.00000015e11; + unit_data(72).name = "atomic unit of electric field gradient"; + unit_data(72).value = 9.71736200e21; + unit_data(72).uncertainty = 0.00000021e21; + unit_data(72).units = "V m^-2"; - unit_data( 77 ).name="ELECTRON_DEUTERON_MAGN_MOMENT_RATIO"; - unit_data( 77 ).description="electron-deuteron magn. moment ratio"; - unit_data( 77 ).value=-2143.923493; - unit_data( 77 ).units=""; - unit_data( 77 ).uncertanity=0.000023; + unit_data(73).name = "atomic unit of electric polarizability"; + unit_data(73).value = 1.6487772754e-41; + unit_data(73).uncertainty = 0.0000000016e-41; + unit_data(73).units = "C^2 m^2 J^-1"; - unit_data( 78 ).name="ELECTRON_DEUTERON_MASS_RATIO"; - unit_data( 78 ).description="electron-deuteron mass ratio"; - unit_data( 78 ).value=2.7244371095e-4; - unit_data( 78 ).units=""; - unit_data( 78 ).uncertanity=0.0000000013e-4; + unit_data(74).name = "atomic unit of electric potential"; + unit_data(74).value = 27.21138505; + unit_data(74).uncertainty = 0.00000060; + unit_data(74).units = "V"; - unit_data( 79 ).name="ELECTRON_GYROMAGN_RATIO"; - unit_data( 79 ).description="electron gyromagn. ratio"; - unit_data( 79 ).value=1.76085974e11; - unit_data( 79 ).units="s^-1 T^-1"; - unit_data( 79 ).uncertanity=0.00000015e11; + unit_data(75).name = "atomic unit of electric quadrupole mom."; + unit_data(75).value = 4.486551331e-40; + unit_data(75).uncertainty = 0.000000099e-40; + unit_data(75).units = "C m^2"; - unit_data( 80 ).name="ELECTRON_GYROMAGN_RATIO_BY_2_PI"; - unit_data( 80 ).description="electron gyromagn. ratio over 2 pi"; - unit_data( 80 ).value=28024.9532; - unit_data( 80 ).units="MHz T^-1"; - unit_data( 80 ).uncertanity=0.0024; + unit_data(76).name = "atomic unit of energy"; + unit_data(76).value = 4.35974434e-18; + unit_data(76).uncertainty = 0.00000019e-18; + unit_data(76).units = "J"; - unit_data( 81 ).name="ELECTRON_G_FACTOR"; - unit_data( 81 ).description="electron g factor"; - unit_data( 81 ).value=-2.0023193043718; - unit_data( 81 ).units=""; - unit_data( 81 ).uncertanity=0.0000000000075; + unit_data(77).name = "atomic unit of force"; + unit_data(77).value = 8.23872278e-8; + unit_data(77).uncertainty = 0.00000036e-8; + unit_data(77).units = "N"; - unit_data( 82 ).name="ELECTRON_MAGN_MOMENT"; - unit_data( 82 ).description="electron magn. moment"; - unit_data( 82 ).value=-928.476412e-26; - unit_data( 82 ).units="J T^-1"; - unit_data( 82 ).uncertanity=0.000080e-26; + unit_data(78).name = "atomic unit of length"; + unit_data(78).value = 0.52917721092e-10; + unit_data(78).uncertainty = 0.00000000017e-10; + unit_data(78).units = "m"; - unit_data( 83 ).name="ELECTRON_MAGN_MOMENT_ANOMALY"; - unit_data( 83 ).description="electron magn. moment anomaly"; - unit_data( 83 ).value=1.1596521859e-3; - unit_data( 83 ).units=""; - unit_data( 83 ).uncertanity=0.0000000038e-3; + unit_data(79).name = "atomic unit of mag. dipole mom."; + unit_data(79).value = 1.854801936e-23; + unit_data(79).uncertainty = 0.000000041e-23; + unit_data(79).units = "J T^-1"; - unit_data( 84 ).name="ELECTRON_MAGN_MOMENT_TO_BOHR_MAGNETON_RATIO"; - unit_data( 84 ).description="electron magn. moment to Bohr magneton ratio"; - unit_data( 84 ).value=-1.0011596521859; - unit_data( 84 ).units=""; - unit_data( 84 ).uncertanity=0.0000000000038; + unit_data(80).name = "atomic unit of mag. flux density"; + unit_data(80).value = 2.350517464e5; + unit_data(80).uncertainty = 0.000000052e5; + unit_data(80).units = "T"; - unit_data( 85 ).name="ELECTRON_MAGN_MOMENT_TO_NUCLEAR_MAGNETON_RATIO"; - unit_data( 85 ).description="electron magn. moment to nuclear magneton ratio"; - unit_data( 85 ).value=-1838.28197107; - unit_data( 85 ).units=""; - unit_data( 85 ).uncertanity=0.00000085; + unit_data(81).name = "atomic unit of magnetizability"; + unit_data(81).value = 7.891036607e-29; + unit_data(81).uncertainty = 0.000000013e-29; + unit_data(81).units = "J T^-2"; - unit_data( 86 ).name="ELECTRON_MASS"; - unit_data( 86 ).description="electron mass"; - unit_data( 86 ).value=9.1093826e-31; - unit_data( 86 ).units="kg"; - unit_data( 86 ).uncertanity=0.0000016e-31; + unit_data(82).name = "atomic unit of mass"; + unit_data(82).value = 9.10938291e-31; + unit_data(82).uncertainty = 0.00000040e-31; + unit_data(82).units = "kg"; - unit_data( 87 ).name="ELECTRON_MASS_ENERGY_EQUIVALENT"; - unit_data( 87 ).description="electron mass energy equivalent"; - unit_data( 87 ).value=8.1871047e-14; - unit_data( 87 ).units="J"; - unit_data( 87 ).uncertanity=0.0000014e-14; + unit_data(83).name = "atomic unit of mom.um"; + unit_data(83).value = 1.992851740e-24; + unit_data(83).uncertainty = 0.000000088e-24; + unit_data(83).units = "kg m s^-1"; - unit_data( 88 ).name="ELECTRON_MASS_ENERGY_EQUIVALENT_IN_MEV"; - unit_data( 88 ).description="electron mass energy equivalent in MeV"; - unit_data( 88 ).value=0.510998918; - unit_data( 88 ).units="MeV"; - unit_data( 88 ).uncertanity=0.000000044; + unit_data(84).name = "atomic unit of permittivity"; + unit_data(84).value = 1.112650056e-10; + unit_data(84).uncertainty = 0.0; + unit_data(84).units = "F m^-1"; - unit_data( 89 ).name="ELECTRON_MASS_IN_U"; - unit_data( 89 ).description="electron mass in u"; - unit_data( 89 ).value=5.4857990945e-4; - unit_data( 89 ).units="u"; - unit_data( 89 ).uncertanity=0.0000000024e-4; + unit_data(85).name = "atomic unit of time"; + unit_data(85).value = 2.418884326502e-17; + unit_data(85).uncertainty = 0.000000000012e-17; + unit_data(85).units = "s"; - unit_data( 90 ).name="ELECTRON_MOLAR_MASS"; - unit_data( 90 ).description="electron molar mass"; - unit_data( 90 ).value=5.4857990945e-7; - unit_data( 90 ).units="kg mol^-1"; - unit_data( 90 ).uncertanity=0.0000000024e-7; + unit_data(86).name = "atomic unit of velocity"; + unit_data(86).value = 2.18769126379e6; + unit_data(86).uncertainty = 0.00000000071e6; + unit_data(86).units = "m s^-1"; - unit_data( 91 ).name="ELECTRON_MUON_MAGN_MOMENT_RATIO"; - unit_data( 91 ).description="electron-muon magn. moment ratio"; - unit_data( 91 ).value=206.7669894; - unit_data( 91 ).units=""; - unit_data( 91 ).uncertanity=0.0000054; + unit_data(87).name = "characteristic impedance of vacuum"; + unit_data(87).value = 376.730313461; + unit_data(87).uncertainty = 0.0; + unit_data(87).units = "ohm"; - unit_data( 92 ).name="ELECTRON_MUON_MASS_RATIO"; - unit_data( 92 ).description="electron-muon mass ratio"; - unit_data( 92 ).value=4.83633167e-3; - unit_data( 92 ).units=""; - unit_data( 92 ).uncertanity=0.00000013e-3; + unit_data(88).name = "classical electron radius"; + unit_data(88).value = 2.8179403267e-15; + unit_data(88).uncertainty = 0.0000000027e-15; + unit_data(88).units = "m"; - unit_data( 93 ).name="ELECTRON_NEUTRON_MAGN_MOMENT_RATIO"; - unit_data( 93 ).description="electron-neutron magn. moment ratio"; - unit_data( 93 ).value=960.92050; - unit_data( 93 ).units=""; - unit_data( 93 ).uncertanity=0.00023; + unit_data(89).name = "conductance quantum"; + unit_data(89).value = 7.7480917346e-5; + unit_data(89).uncertainty = 0.0000000025e-5; + unit_data(89).units = "S"; - unit_data( 94 ).name="ELECTRON_NEUTRON_MASS_RATIO"; - unit_data( 94 ).description="electron-neutron mass ratio"; - unit_data( 94 ).value=5.4386734481e-4; - unit_data( 94 ).units=""; - unit_data( 94 ).uncertanity=0.0000000038e-4; + unit_data(90).name = "conventional value of Josephson constant"; + unit_data(90).value = 483597.9e9; + unit_data(90).uncertainty = 0.0; + unit_data(90).units = "Hz V^-1"; - unit_data( 95 ).name="ELECTRON_PROTON_MAGN_MOMENT_RATIO"; - unit_data( 95 ).description="electron-proton magn. moment ratio"; - unit_data( 95 ).value=-658.2106862; - unit_data( 95 ).units=""; - unit_data( 95 ).uncertanity=0.0000066; + unit_data(91).name = "conventional value of von Klitzing constant"; + unit_data(91).value = 25812.807; + unit_data(91).uncertainty = 0.0; + unit_data(91).units = "ohm"; - unit_data( 96 ).name="ELECTRON_PROTON_MASS_RATIO"; - unit_data( 96 ).description="electron-proton mass ratio"; - unit_data( 96 ).value=5.4461702173e-4; - unit_data( 96 ).units=""; - unit_data( 96 ).uncertanity=0.0000000025e-4; + unit_data(92).name = "deuteron g factor"; + unit_data(92).value = 0.8574382308; + unit_data(92).uncertainty = 0.0000000072; + unit_data(92).units = ""; - unit_data( 97 ).name="ELECTRON_TAU_MASS_RATIO"; - unit_data( 97 ).description="electron-tau mass ratio"; - unit_data( 97 ).value=2.87564e-4; - unit_data( 97 ).units=""; - unit_data( 97 ).uncertanity=0.00047e-4; + unit_data(93).name = "deuteron mag. mom."; + unit_data(93).value = 0.433073489e-26; + unit_data(93).uncertainty = 0.000000010e-26; + unit_data(93).units = "J T^-1"; - unit_data( 98 ).name="ELECTRON_TO_ALPHA_PARTICLE_MASS_RATIO"; - unit_data( 98 ).description="electron to alpha particle mass ratio"; - unit_data( 98 ).value=1.37093355575e-4; - unit_data( 98 ).units=""; - unit_data( 98 ).uncertanity=0.00000000061e-4; + unit_data(94).name = "deuteron mag. mom. to Bohr magneton ratio"; + unit_data(94).value = 0.4669754556e-3; + unit_data(94).uncertainty = 0.0000000039e-3; + unit_data(94).units = ""; - unit_data( 99 ).name="ELECTRON_TO_SHIELDED_HELION_MAGN_MOMENT_RATIO"; - unit_data( 99 ).description="electron to shielded helion magn. moment ratio"; - unit_data( 99 ).value=864.058255; - unit_data( 99 ).units=""; - unit_data( 99 ).uncertanity=0.000010; + unit_data(95).name = "deuteron mag. mom. to nuclear magneton ratio"; + unit_data(95).value = 0.8574382308; + unit_data(95).uncertainty = 0.0000000072; + unit_data(95).units = ""; - unit_data( 100 ).name="ELECTRON_TO_SHIELDED_PROTON_MAGN_MOMENT_RATIO"; - unit_data( 100 ).description="electron to shielded proton magn. moment ratio"; - unit_data( 100 ).value=-658.2275956;... [truncated message content] |
From: <car...@us...> - 2012-04-24 17:13:56
|
Revision: 10325 http://octave.svn.sourceforge.net/octave/?rev=10325&view=rev Author: carandraug Date: 2012-04-24 17:13:49 +0000 (Tue, 24 Apr 2012) Log Message: ----------- textable: new function to create LaTeX tables from a matrix. Submitted by Markus Bergholz <mar...@gm...> Modified Paths: -------------- trunk/octave-forge/main/miscellaneous/NEWS Added Paths: ----------- trunk/octave-forge/main/miscellaneous/inst/textable.m Modified: trunk/octave-forge/main/miscellaneous/NEWS =================================================================== --- trunk/octave-forge/main/miscellaneous/NEWS 2012-04-24 16:26:11 UTC (rev 10324) +++ trunk/octave-forge/main/miscellaneous/NEWS 2012-04-24 17:13:49 UTC (rev 10325) @@ -4,7 +4,8 @@ miscellaneous-1.2.0 Release Date: 2012-XX-XX Release Manager: =============================================================================== ** New functions: - truncate.m : truncates a number to a given precision. + truncate: truncates a number to a given precision. + textable: create LaTeX tables from matrix ** The following functions have been imported from the combinatorics package which has been removed: Added: trunk/octave-forge/main/miscellaneous/inst/textable.m =================================================================== --- trunk/octave-forge/main/miscellaneous/inst/textable.m (rev 0) +++ trunk/octave-forge/main/miscellaneous/inst/textable.m 2012-04-24 17:13:49 UTC (rev 10325) @@ -0,0 +1,142 @@ +## Copyright (C) 2012 Markus Bergholz <markuman at gmail dot com> +## +## 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; if not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## @deftypefn {Function File} {} textable (@var{matrix}, @var{texfile}) +## @deftypefnx {Function File} {} textable (@var{matrix}, @var{texfile}, @var{rlines}) +## @deftypefnx {Function File} {} textable (@var{matrix}, @var{texfile}, @var{rlines}, @var{clines}) +## @deftypefnx {Function File} {} textable (@var{matrix}, @var{texfile}, @var{rlines}, @var{clines}, @var{alignment}) +## @deftypefnx {Function File} {} textable (@var{matrix}, @var{texfile}, @var{rlines}, @var{clines}, @var{alignment}, @var{matrixformat}) +## Save matrix in Latex table (tabular) format. +## +## The generated latex file can be inserted in any latex document by using the +## @code{\input@{latex file name without .tex@}} statement. +## +## Allowed values: +## @itemize @bullet +## @item @var{matrix}: your matrix. doesn't matter if it comes from variable or not. +## @item @var{texfile}: location where you want to save your .tex file. +## @item @var{rlines}: 0 (false), 1 (true [default]) +## @item @var{clines}: 0 (false), 1 (true [default]) +## @item @var{alignment}: 0 (center), 1 (left), 2 (right [default]) +## @item @var{matrixformat}: 0 [default], 1 [forces all other values to false/0] +## @end itemize +## +## The following example creates a LaTeX code with rows and columns lines and +## right alignment (default values). +## +## @example +## @group +## textable ([1 4; 7.5 2], "example.tex") +## +## ## will save on the example.tex file +## \begin@{tabular@}@{|r|r|@} +## \hline +## 1 & 4 \\ +## \hline +## 7.5 & 2 \\ +## \hline +## \end@{tabular@} +## @end group +## @end example +## +## Creates a table from matrix A without rows lines, without columns lines and +## with center alignment: +## @example +## @group +## textable(A, "my-A-Matrix.tex",0,0,0) +## @end group +## @end example +## +## +## Creates a table from a random matrix without rows lines, but with columns +## lines and with left alignment: +## @example +## @group +## textable(rand(3,3), 'amazing-random-table.tex',0,1,1) +## @end group +## @end example +## +## @seealso{csv2latex, publish} +## @end deftypefn + +## rlines = row lines = \hline +## clines = column lines = | +## alignment = center, left or right = c,l,r + +function textable (data, filename, rlines = 1, clines = 1, alignment = "r", matrixformat = 0) + + if (nargin < 2 || nargin > 6) + print_usage; + endif + + if nargin >= 5 + if alignment == 0 + alignment = "c"; + elseif alignment == 1 + alignment = "l"; + elseif alignment == 2 + alignment = "r"; + else + error ("unknown value for alignment"); + end + end + + if exist ('matrixformat') + clines = 0; + rlines = 0; + alignment = 0; + else + matrixformat = 0; + endif + + ## print my tex file + f = fopen(filename,"w"); + + if matrixformat == 1 + fprintf(f,"\\begin{displaymath} \n"); + fprintf(f,"\\mathbf{X} = \n"); + fprintf(f,["\\left( \\begin{array} {*{ %d }{c}}\n" + " \n \\toprule \n"],\ + columns(data)); + else + if clines == 1 + fprintf(f, ["\\begin{tabular}{|%s}\n"], repmat (cstrcat(alignment,"|"),[1,columns(data)])); + else + fprintf(f, ["\\begin{tabular}{%s}\n"], repmat (alignment,[1,columns(data)])); + endif + endif + + if rlines == 1 + fprintf(f," \\hline \n"); + endif + + + for ii = 1:rows(data) + fprintf(f,"%g",data(ii,1)); + fprintf(f," & %g",data(ii,2:end)); + fprintf(f," \\\\ \n"); + if rlines == 1 + fprintf(f," \\hline \n"); + endif + endfor + if matrixformat == 1 + fprintf(f,"\\end{array}\\right)\n"); + fprintf(f,"\\end{displaymath}") + else + fprintf(f,"\\end{tabular}\n"); + endif + fclose(f); +endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-24 16:26:18
|
Revision: 10324 http://octave.svn.sourceforge.net/octave/?rev=10324&view=rev Author: carandraug Date: 2012-04-24 16:26:11 +0000 (Tue, 24 Apr 2012) Log Message: ----------- kmeans: added initial documentation block Modified Paths: -------------- trunk/octave-forge/main/statistics/inst/kmeans.m Modified: trunk/octave-forge/main/statistics/inst/kmeans.m =================================================================== --- trunk/octave-forge/main/statistics/inst/kmeans.m 2012-04-24 16:20:55 UTC (rev 10323) +++ trunk/octave-forge/main/statistics/inst/kmeans.m 2012-04-24 16:26:11 UTC (rev 10324) @@ -14,6 +14,13 @@ ## You should have received a copy of the GNU General Public License along with ## this program; if not, see <http://www.gnu.org/licenses/>. +## -*- texinfo -*- +## @deftypefn {Function File} {[@var{idx}, @var{centers}] =} kmeans (@var{data}, @var{k}, @var{param1}, @var{value1, @dots{}) +## K-means clustering. +## +## @seealso{linkage} +## @end deftypefn + function [classes, centers, sumd, D] = kmeans (data, k, varargin) [reg, prop] = parseparams (varargin); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |