Cody

Problem 44434. Writing Error Messages

Created by Michael Eldredge in Community

Well written functions check inputs to make sure the input is valid. The function ErrorCheck takes three arguments:

  • a - a scalar value
  • b - either a string, or a character array
  • c - a square matrix (numerical array)

If the input is anything other then this, throw the error message

'Cody demonstration error'

If the input is good, simply return 23.

Solution Stats

43.75% Correct | 56.25% Incorrect
Last solution submitted on Feb 25, 2019

Problem Comments