Last change
on this file since 24902 was 24902, checked in by jdquinn, 5 years ago |
CHG: MATLAB -> Python translation; fixed syntax bug from previous commit.
|
File size:
332 bytes
|
Line | |
---|
1 | function radius=planetradius(planet)
|
---|
2 | %PLANETRADIUS - return planet radius according to planetary body name.
|
---|
3 | %
|
---|
4 | % Usage:
|
---|
5 | % radius=planetradius(planet);
|
---|
6 | %
|
---|
7 | % Examples:
|
---|
8 | % earthradius=planetradius('earth');
|
---|
9 |
|
---|
10 | if strcmpi(planet,'earth'),
|
---|
11 | radius=6.371012*10^6;
|
---|
12 | else
|
---|
13 | error(['planet type ' planet ' not supported yet!']);
|
---|
14 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.