read different file formats then return their values
조회 수: 1 (최근 30일)
이전 댓글 표시
How can I read (.CEP) file format through matlab. I tried fscanf and then disp. fscanf is not working and disp always displays -1 for all my .CEP files!!!
So, what command cann I use to read them?
댓글 수: 8
Walter Roberson
2011년 5월 13일
fid will only be a file identifier. You will need to textscan() or fscanf() or the like to read the data. See Oleg's example.
채택된 답변
Oleg Komarov
2011년 5월 12일
fid = fopen('fullpath/namefile.cep'); % In read mode by default
data = textscan(fid,repmat('%f',1,15),'Delimiter',' ');
fid = fclose(fid);
Substitute 'fullpath/namefile.cep' with your path and the name of the file
댓글 수: 3
Walter Roberson
2011년 5월 13일
textscan() returns a cell array.
If you change Oleg's textscan() to
data = textscan(fid,repmat('%f',1,15),'Delimiter',' ','CombineOutput',true);
then afterwards data{1} will be the entire matrix of data.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Speech Recognition에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!