How to open files with *.log extension? The format is the follow,

Dear all,
I need to know, How to open files with *.log extension?
The format is the follow,
Terminal log file Date: 13/03/2017 - 18:28:22
-----------------------------------------------
D 0016.918
D 0016.924
D 0016.915

 Accepted Answer

what data you want to extract?
You can use a textscan
doc textscan
fid = fopen('Test_file1.txt','r');
formatSpec = '%s %f';
N = 10;
[indata, position] = textscan(fid,formatSpec,N,'HeaderLines',2,'Delimiter','\t');
fclose(fid);

2 Comments

Hi Chocolate Warrior,
Your function open the file :) but don't divide in columns :(
Do you know, what the problem? Thanks
Can you post the actual file [at least with few top rows]?

Sign in to comment.

More Answers (0)

Categories

Tags

Asked:

on 15 Mar 2017

Commented:

ES
on 16 Mar 2017

Community Treasure Hunt

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

Start Hunting!