필터 지우기
필터 지우기

How to extract data from a long csv object that is given as a single text variable

조회 수: 4 (최근 30일)
I have a single long text variable from a table A that looks like this:
A{1}=‘[WAKE,WAKE,WAKE,DEEP,LIGHT,REM,WAKE,REM,WAKE,REM,WAKE,WAKE]’ -----over a thousand entries
How do I extract these text objects in Matlab so I can assign integer values to them?

채택된 답변

Ankit Kumar
Ankit Kumar 2019년 10월 23일
Hi Stewart,
You can extract the different text entries using strsplit(). Refer this for more info,
Then you can convert them into text objects using mlreportgen.dom.Text(), for example:
textObj = mlreportgen.dom.Text('abc');
For more info see this,

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Text Data Preparation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by