필터 지우기
필터 지우기

How to join the char and num in one matrix

조회 수: 1 (최근 30일)
Innosens
Innosens 2012년 10월 31일
i have data char and num , can i join both in one matrix.....
the data is
12:00 AM 26
12:30 AM 27
1:30 AM 28

답변 (1개)

Walter Roberson
Walter Roberson 2012년 10월 31일
No. A numeric array can hold numeric data only. A character array can hold character data only.
You can convert the numeric data into character data so that your array is all character, or you can use a cell array.
{'12:00 AM', 26; '12:30 AM', 27, '1:30 AM', 28}

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by