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!