How to covert all table entries to non-cell?

조회 수: 3 (최근 30일)
Atanu
Atanu 2022년 3월 17일
댓글: Atanu 2022년 3월 18일
I have a table where all the entries are as 1*1 cell array. Here is part of table attached.
test_data.date(1)
ans =
1×1 cell array
{'02/10/2022'}
How can I convert all table entries to non cell native data types?

답변 (1개)

KSSV
KSSV 2022년 3월 17일
Two options.
  1. While reading the table, you can specify the format of each column and read it. Read about the detectImportOptions.
  2. After reading the table, you can convert to the format you want. Read about datetime, str2num, str2double, etc.
  댓글 수: 1
Atanu
Atanu 2022년 3월 18일
Thanks for your comment. But I have the table already in the workspace. So I had to convert the data from the workspace.

댓글을 달려면 로그인하십시오.

카테고리

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

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by