Skip to main content
Commonmark migration
Source Link

#Matlab/Octave, 7 5 bytes

Matlab/Octave, 7 5 bytes

Unsurprisingly there's a built-in function for finding modes. As an anonymous function:

@mode

This returns the most commonly occuring element in the input vector with ties going to the smaller value.

Saved 2 bytes thanks to Dennis!

#Matlab/Octave, 7 5 bytes

Unsurprisingly there's a built-in function for finding modes. As an anonymous function:

@mode

This returns the most commonly occuring element in the input vector with ties going to the smaller value.

Saved 2 bytes thanks to Dennis!

Matlab/Octave, 7 5 bytes

Unsurprisingly there's a built-in function for finding modes. As an anonymous function:

@mode

This returns the most commonly occuring element in the input vector with ties going to the smaller value.

Saved 2 bytes thanks to Dennis!

added 118 characters in body
Source Link
Alex A.
  • 24.8k
  • 5
  • 39
  • 120

#Matlab/Octave, 77 5 bytes

  

Unsurprisingly there's a built-in function for finding modes. Given a vector d, the code is justAs an anonymous function:

mode(d)
@mode

whichThis returns the most commonly occuring element in dthe input vector with ties going to the smaller value.

Saved 2 bytes thanks to Dennis!

#Matlab/Octave, 7 bytes

 

Unsurprisingly there's a built-in function for finding modes. Given a vector d, the code is just:

mode(d)

which returns the most commonly occuring element in d.

#Matlab/Octave, 7 5 bytes

 

Unsurprisingly there's a built-in function for finding modes. As an anonymous function:

@mode

This returns the most commonly occuring element in the input vector with ties going to the smaller value.

Saved 2 bytes thanks to Dennis!

Source Link
Alex A.
  • 24.8k
  • 5
  • 39
  • 120

#Matlab/Octave, 7 bytes

Unsurprisingly there's a built-in function for finding modes. Given a vector d, the code is just:

mode(d)

which returns the most commonly occuring element in d.