how to read this file in matlab?

2 ビュー (過去 30 日間)
sandy
sandy 2013 年 9 月 4 日
hi.. i have a .tim extension files(nearly 150000)...which is float32 format.. i need to read that file using matlab and save in MS-excel format as output.is it possible..? help me with this..pl...whether it is similar like converting a binary format to ASCII format..? any easy code r function to reduce time consumption in converting ..?

回答 (2 件)

ES
ES 2013 年 9 月 4 日
You can read the .tim file using
FileObj=fopen(FileName);
FileData=textscan(FileObj, ...
'%s .....', 'delimiter', ',');
then modify your data if you need and then write them into xls by
xlswrite
or
using ActiveX COM object.
  1 件のコメント
sandy
sandy 2013 年 9 月 5 日
thanks...textscan is not working in my case..its not converting my file to ascii format..any alternate ways??

サインインしてコメントする。


Walter Roberson
Walter Roberson 2013 年 9 月 5 日
fread() can read float32 binary. Watch out for possible differences in byte order.

カテゴリ

Help Center および File ExchangeUse COM Objects in MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by