Planet id number from name.
%-------------------------------------------------------------------------- % Copyright (c) 2018 Princeton Satellite Systems, Inc. % All rights reserved. %-------------------------------------------------------------------------- % Since 2018.1 %-------------------------------------------------------------------------- planet = {'sun' 'Earth' 'Moon' 'Charon'}; id = PlanetId(planet); for k = 1:length(id) fprintf(1,'The planet id for %s is %d\n',planet{k},id(k)); end %-------------------------------------- % $Id: 48b4e4d20855005cbcb91ddf0f8ccac1f0c74efa $
Warning: Charon not available The planet id for sun is 0 The planet id for Earth is 3 The planet id for Moon is 10 The planet id for Charon is NaN