fscanf import txt file
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Workspace Variables and MAT Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!