How to fix odd string imports?

조회 수: 1 (최근 30일)
Dc215905
Dc215905 2021년 6월 25일
답변: Walter Roberson 2021년 6월 25일
Hello,
I'm importing data and and forwhatever reason the strings get imported as:
  댓글 수: 2
Walter Roberson
Walter Roberson 2021년 6월 25일
Unfortunately, your example did not get posted.
How are you doing your importing?
What kind of file are you importing from?
Which MATLAB release do you have?
Dc215905
Dc215905 2021년 6월 25일
편집: Dc215905 2021년 6월 25일
Thanks for your reply.
The example are:
'ÿÿÿÿÿÿÿÿ' , ' 'Spot1.cfs ÿÿÿ', XFlags ÿÿÿÿ
I'm using to read the text and it's from a .cfs file (data aquisition software)
fread(fid,[1,8],'uint8=>char');
I'm using matlab 2021a

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

답변 (1개)

Walter Roberson
Walter Roberson 2021년 6월 25일
Which .cfs ?
The ÿ character is unicode U+00FF so the most likely situation is that you are reading a binary file (that might have text-readable parts)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by