how to know what type of dataset you have?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi I am new to MATLAB and programming in general and get confused across knowing what type of data sets i have i.e cell array matrix numeric int etc as sometimes when creating.
I know there are various functions like iscell(x) to find out the details of if its a cell etc but is there and easier way to test this. For example a generic command in which you would have is???(x) and it will pop out and tell you exactly what type of data set you have. I ask this as most my confusion and errors at the moment come because i don't know what i have created all the time and spend ages trying to find out what i have and convert it to whats needed.
can someone tell me the difference between a cell and matrix?
sorry for basic stupid questions but just like to build up my knowledge base....also a link to detailed documentation would be good also.
Thanks in advance.
0 commentaires
Réponse acceptée
Jan
le 15 Août 2013
Are you looking for the class command?
a = cell(1, 3)
b = 1:3
class(a)
class(b)
A matrix consists of scalar elements, which all have the same type. But a cell can contain elements of different types and they can have different sizes also:
A = [1, 2, 3; 4, 5, 6];
C = {1, [1,2], 'Hello', {'A nested cell'}}
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!