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

40 Solutions

14 Solvers

Last Solution submitted on Mar 16, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers14

Suggested Problems

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!