Search code examples
pythonpandasmatlabmatlab-table

Matlab equivalent of Python Panda's dtypes


If I have a pandas.DataFrame in python I can inspect the data types for the DataFrame with the dtypes attribute. How can I do the same with a Matlab table? I poked around the Properties mechanism but didn't find anything type oriented there.


Solution

  • It appears that you can call the following:

    varfun(@class,t,'OutputFormat',table)
    
    
    class_var1   class_var2    class_var3    class_var4 
    __________   __________    __________    __________
    
    double       double        double        double  
    

    where t is your table. I am referencing the answer here.

    Further documentation on varfun is available here as well.