You can use the class function in Matlab to get the data type of a variable. Here's an example:
main.m42 chars3 lines
In this example, a is a variable of type double, which is why the class function returns the string 'double'.
gistlibby LogSnag