Input type fix and added matlab table type in switch statement.

Fixed the check for a single input type so that it would correctly handle a single input. Added a switch statement to handle matlab tables.
Just adding table here, since that is what I was using it for.