Skip to main content
Rollback to Revision 2
Source Link
Luis Mendo
  • 106.9k
  • 10
  • 142
  • 385

MATLAB with Mapping Toolbox, 26 bytes

@(x)distance(x{:})*9.65*pi

Anonymous function that takes the four inputs as a cell array, in the same order as described in the challenge.

Note that this gives exact results (assuming that the Moon radius is 1737 km), because 1737/180 equals 9.65.

Example run in Matlab R2017b:

 

enter image description here

MATLAB with Mapping Toolbox, 26 bytes

@(x)distance(x{:})*9.65*pi

Anonymous function that takes the four inputs as a cell array, in the same order as described in the challenge.

Note that this gives exact results (assuming that the Moon radius is 1737 km), because 1737/180 equals 9.65.

Example run in Matlab R2017b:

 

MATLAB with Mapping Toolbox, 26 bytes

@(x)distance(x{:})*9.65*pi

Anonymous function that takes the four inputs as a cell array, in the same order as described in the challenge.

Note that this gives exact results (assuming that the Moon radius is 1737 km), because 1737/180 equals 9.65.

Example run in Matlab R2017b:

enter image description here

deleted 22 characters in body
Source Link
Luis Mendo
  • 106.9k
  • 10
  • 142
  • 385

MATLAB with Mapping Toolbox, 26 bytes

@(x)distance(x{:})*9.65*pi

Anonymous function that takes the four inputs as a cell array, in the same order as described in the challenge.

Note that this gives exact results (assuming that the Moon radius is 1737 km), because 1737/180 equals 9.65.

Example run in Matlab R2017b:

enter image description here

 

MATLAB with Mapping Toolbox, 26 bytes

@(x)distance(x{:})*9.65*pi

Anonymous function that takes the four inputs as a cell array, in the same order as described in the challenge.

Note that this gives exact results (assuming that the Moon radius is 1737 km), because 1737/180 equals 9.65.

Example run in Matlab R2017b:

enter image description here

MATLAB with Mapping Toolbox, 26 bytes

@(x)distance(x{:})*9.65*pi

Anonymous function that takes the four inputs as a cell array, in the same order as described in the challenge.

Note that this gives exact results (assuming that the Moon radius is 1737 km), because 1737/180 equals 9.65.

Example run in Matlab R2017b:

 
added 36 characters in body
Source Link
Luis Mendo
  • 106.9k
  • 10
  • 142
  • 385

MATLAB with Mapping Toolbox, 26 bytes

@(x)distance(x{:})*9.65*pi

Anonymous function that takes the four inputs as a cell array, in the same order as described in the challenge.

Note that this gives exact results (assuming that the Moon radius is 1737 km), because 1737/180 equals 9.65.

Example run in Matlab R2017b:

enter image description here

MATLAB with Mapping Toolbox, 26 bytes

@(x)distance(x{:})*9.65*pi

Anonymous function that takes the four inputs as a cell array, in the same order as described in the challenge.

Note that this gives exact results, because 1737/180 equals 9.65.

Example run in Matlab R2017b:

enter image description here

MATLAB with Mapping Toolbox, 26 bytes

@(x)distance(x{:})*9.65*pi

Anonymous function that takes the four inputs as a cell array, in the same order as described in the challenge.

Note that this gives exact results (assuming that the Moon radius is 1737 km), because 1737/180 equals 9.65.

Example run in Matlab R2017b:

enter image description here

Source Link
Luis Mendo
  • 106.9k
  • 10
  • 142
  • 385
Loading