how to know what type of dataset you have?

조회 수: 2 (최근 30일)
Gurvinder
Gurvinder 2013년 8월 15일
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.

채택된 답변

Jan
Jan 2013년 8월 15일
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'}}

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by