Hello,
 
I would like to write a function that accepts as an argument a variable that could be a series, a matrix or a scalar. The function should behave differently depending on the variable type passed. Is there a good way to do this, i.e. what should the function declaration look like?
 
Thanks,
 
Logan