how to know what type of dataset you have?
조회 수: 2 (최근 30일)
이전 댓글 표시
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
채택된 답변
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 Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!