Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Matlab data reading excluding headers

Status
Not open for further replies.

von Moltke

Junior Member level 1
Junior Member level 1
Joined
Sep 11, 2012
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Turkey-Ankara
Activity points
1,439
Hello there,

I have txt. files which are recorded by some oscilloscope in the format:

LECROYSDA813Zi,51921,Waveform
Segments,1,SegmentSize,20000002
Ampl
-0.075
-0.075
0.075
-0.06875
0.0625
-0.0625

How can I get the only the amplitude data into MATLAB, without deleting header lines in the txt.?

Thanks in advance..
 

In "Current Folder" window in Matlab, klick right mouse button on a file that You want to import, and then choose "import data" from menu.
After that You just declare the "number of text in header lines" at the top right side of the import wizard window
 
Hello again,

A friend of mine proposed a single code fragment:

----
fid = fopen('text.txt','rt');
datas = textscan(fid','%f','headerLines',3);
data = datas{1}
fclose(fid);
----

and it worked! Wanted to announce here..
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top