|
Last change
on this file since 24776 was 24776, checked in by Eric.Larour, 5 years ago |
|
CHG: planet radius function (according to planet type)
|
|
File size:
334 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.