필터 지우기
필터 지우기

Remove ' from table

조회 수: 22 (최근 30일)
Sarah Yun
Sarah Yun 2019년 12월 28일
답변: Cris LaPierre 2019년 12월 28일
Hi,
I used the 'readtable' function to read a textfile in Matlab and every value in every cell now has a ' around it e.g. '2015'
How can I remove the ' from every column - there are 22 columns
afasfasf.png
Also, I cannot use readtable function when loading another textfile
Error: All lines of a text file must have the same number of delimiters. Line 4546
has 16 delimiters, while preceding lines have 14.
Please can you help me solve this problem?
Simple solution. I am beginner.
  댓글 수: 2
Walter Roberson
Walter Roberson 2019년 12월 28일
You either failed to skip a header, or else some elements of the column contain text (e.g., "N/A" or "Missing"). It is best to have another look at the file and determine which of the two applies, as the strategies differ between the two.
the cyclist
the cyclist 2019년 12월 28일
It would be helpful if you uploaded the text files and the code you used to load them into MATLAB.

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

답변 (1개)

Cris LaPierre
Cris LaPierre 2019년 12월 28일
You could try using the Import Data tool to import the data interactively. This would allow you test various settings and see a preview of what the imported data will look like. Once you get it set correctly, generate the code to reuse in your script.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by