motorclass.m
来自「航天工程工具箱」· M 代码 · 共 26 行
M
26 行
function y=motorclass(m)%MOTORCLASS Display motor class or impulse.% Y = MOTORCLASS(M) where M can be either the rocket-motor's% motor class or its total impulse.% If it is a class (a letter ranging from 'A' to 'Z', string 'A/2' or 'A/4')% it will return the interval of total impulse for this class.% Reversely if M is the motors total impulse, then it will return% the class for this motor.%% See also LOADENG, SAVEENG, PLOTENG.% Copyright (c) 2002-02-09, B. Rasmus Anthin.
% Revision 2003-07-21.if ischar(m)
m=upper(m); if strcmp(m,'A/2'),m=char(64);end if strcmp(m,'A/4'),m=char(63);end y=2.5*2^(m-'A'); y=[y/2 y];else y=char(ceil(log(m/2.5)/log(2))+'A'); if y==64,y='A/2';end if y==63,y='A/4';endend
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?