read different file formats then return their values
1 view (last 30 days)
Show older comments
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 Comments
Walter Roberson
on 13 May 2011
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.
Accepted Answer
Oleg Komarov
on 12 May 2011
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 Comments
Walter Roberson
on 13 May 2011
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.
More Answers (0)
See Also
Categories
Find more on Speech Recognition in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!