How to get numerical values of a text type cell ?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I am trying to read the contents of a .txt file, which is the frequency response data I got from other simulation software. The following shows the format of the data, which has 'Frequency' and 'Real/Imaginary' part of the frequency response.
![Capture.JPG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/206189/Capture.jpeg)
I tried using 'readtable()' to load the data into MATLAB, which works. However, the loaded data is in 'Cell' format, and I am not able to get the actual value of the data, please see following.
![Capture.JPG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/206190/Capture.jpeg)
My question is (1) how can I get the actual values ? (2) Is there any better way to do the job than 'readtable()' ? Thanks for help!
댓글 수: 0
채택된 답변
Walter Roberson
2019년 2월 27일
T = readtable(FileName, 'Delimiter', ' ,');
댓글 수: 6
Walter Roberson
2019년 2월 28일
T = readtable(filename, 'Delimiter', '\t,');
You did indeed have a tab.
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!