is there a way to determine the type of input in a function?? For example,
Case 1: if input is a .mat file called 'input.mat' somefunction('input.mat') would recognize that the input is a .mat file
Case 2: if input is a mxn matrix variable called 'input' somefunction(input) would recognize the input as a matlab variable
Case 3: if input is an excel file .xlsx called 'input.xlsx' somefunction('input.xlsx') would recognize the input as an excel file.
Best Answer