diff options
Diffstat (limited to 'inst/axes2ecc.m')
-rw-r--r-- | inst/axes2ecc.m | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/inst/axes2ecc.m b/inst/axes2ecc.m index aacda22..85e2fe5 100644 --- a/inst/axes2ecc.m +++ b/inst/axes2ecc.m @@ -1,4 +1,4 @@ -## Copyright (C) 2018-2020 Philip Nienhuis +## Copyright (C) 2018-2022 Philip Nienhuis ## ## 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 @@ -34,13 +34,13 @@ ## axes2ecc (6378137, 6356752.314245) ## => 0.0818191908429654 ## @end example -## +## ## Row vector (semimajor, semiminor): ## @example ## axes2ecc ([6378137, 6356752.314245]) ## => 0.0818191908429654 ## @end example -## +## ## Multivectors: ## @example ## axes2ecc ([ 71492, 66854; ... @@ -49,8 +49,8 @@ ## 0.3543163789650412 ## 0.0818191908429654 ## @end example -## -## @seealso(ecc2flat,flat2ecc) +## +## @seealso{ecc2flat,flat2ecc} ## @end deftypefn ## Function supplied by anonymous contributor, see: @@ -69,10 +69,10 @@ function ecc = axes2ecc (semimajor, semiminor=[]) if (s(2) != 2) error ("axes2ecc: Nx2 matrix expected for arg. #1"); endif - ecc = sqrt ((semimajor(:, 1) .^ 2 .- semimajor(:, 2) .^ 2) ./ ... + ecc = sqrt ((semimajor(:, 1) .^ 2 - semimajor(:, 2) .^ 2) ./ ... (semimajor(:, 1) .^ 2)); else - ecc = sqrt ((semimajor .^ 2 .- semiminor .^ 2) ./ (semimajor .^ 2)); + ecc = sqrt ((semimajor .^ 2 - semiminor .^ 2) ./ (semimajor .^ 2)); endif endfunction |