fscanf import txt file
1 view (last 30 days)
Show older comments
Hello everyone,I have a complex txt file: PS=220,1422,STA1,0,2,0,1,120,120,0,0
C=34755
T=09/04/2015 10:08:49.000 9
U=3.31,4.81,12.38,23.75
L=-9668
L=-9665
L=-9664
L=-9672
L=-9663
L=-9658
L=-9643
.....
The txt file includes both characters and numbers. I wanto to import the txt file (as an array) in matlab and save only a range of lines. I'm using the following: fileID=fopen('myfile.txt');
A=fscanf(fileID,'%s\n%s\n%s%s\n%g');
but probably I'm wrong somenthing...
Please can you give me suggestions?? many thanks
0 Comments
Answers (0)
See Also
Categories
Find more on Workspace Variables and MAT Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!