how to tell the class of a variable (non-numeric) in a program?

1 visualización (últimos 30 días)
I am reading a header from files. Most of the time, this header is a cell, but sometime it can be a structure with the cell being a field in the struct.
I need to identify the class of the header after I read the file so I can program accordingly.
Any suggestions?
Thanks,
Feng

Respuesta aceptada

Honglei Chen
Honglei Chen el 9 de Ag. de 2012
You can use isa
>> help isa

Más respuestas (0)

Categorías

Más información sobre Structures en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by