In Matlab variable is declared and can know the type of a variable using the class() function.
Matlab type of a variable
class() is a function similar to typeof in javascript.
num = 67
class(num)
str="str"
class(str)
array = [1 2 3];
class(array)
names = {"one","two","three"};
class(names)
num = 67
ans = double
str = str
ans = char
ans = double
ans = cell