etheta2m.m

来自「It s verry good for you」· M 代码 · 共 26 行

M
26
字号
function M = etheta2M(e, theta)
%ETHETA2M                       Convert e and theta to M        
%
%   M = ETHETA2M(e, theta) returns the mean anomaly [M] for given values of
%   [e] and [theta].  
%
%   See also aeM2rtheta, etheta2M.

% Author: Rody P.S. Oldenhuis
% Delft University of Technology
% E-mail: oldenhuis@dds.nl
% Last edited: 27/Aug/2008

    % seperate ellipses from hyperbolas
    ell = (e < 1);
    hyp = (e > 1);
    
    % get E's 
    E = etheta2E(e, theta);
    
    % output results
    M      = zeros(size(e));
    M(ell) = E(ell) - e(ell).*sin(E(ell));
    M(hyp) = e(hyp).*sinh(E(hyp)) - E(hyp);
    
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?