How to convert string data to cells ?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have Data in string form and want to convert that data to cells:
String Data =
(114) Ins = 4
Battery Checking Plus
Account number: 23455654 a73 July 1, 2014 - July 31, 2014 a73 Page 1 of 6
Questions?
Available by phone 24 hours a day, 7 days a week:
300-CALL-BAT (342-25-11)
TTY: 1-800-877-4833
En español: 1-877-337-7454
Online: Bat.com/biz
Write: Bat Fargo shop, N.A. (114)
P.O. Box 345
Portland, OR 9235-6223
Please help me in converting this data to cells with a delimiter of Tab Thanks:
댓글 수: 3
Geoff Hayes
2014년 11월 2일
The syntax in your dlmwrite statement must generate an error since there is a space between String and Data. Your code then imports the data into a local variable y which is presumably a cell array, yet in cell2csv the code references a.textdata. It isn't clear how this code would work.
If I just copy your text data into a text file (as is), I suspect that y is a 23x1 cell array. So trying to use a delimiter on each line will do nothing since there is only one column in your cell array (if more than one, then a tab would separate each column).
I think that you need to better describe your problem, and indicate how you want the output to appear. Please show how you expect the tab delimiter to be used in your above text file example.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!