extracting specific data from extra large text file( a part of it is attached) into an array in the format mentioned in the attached excel
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
Seeking for help in extracting data from a very big text file( a part of it is attached) into an array of format mentioned in the attached excel. Basically, trying to extract data between two strings ---Tx RF verify Measurement Results--- and ---Performing Tx RF verify ended--- into an array as per the format attached in the excel.
5 件のコメント
per isakson
2019 年 1 月 3 日
編集済み: per isakson
2019 年 1 月 4 日
This might be a first step
%%
fid = fopen('example.txt');
% 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
cac = textscan( fid, '%*s%*s%s%d%s%d%s%s%f%s%f%s%s%d%s%s%s%s%s%f%[^\r\n]' ...
, 'Headerlines',2, 'Delimiter','\t', 'MultipleDelimsAsOne',false );
fclose( fid );
It reads three lines too many, thus end-3 . Inspect the result
>> cac{18}(1:end-3)
ans =
22.9500
3.4100
22.0500
23.9500
4.4100
25.0500
>> cac{7}(1:end-3)
ans =
180
180
180
181
181
181
cac{19}(1:end-3)
ans =
6×1 cell array
{'Limits 22 to 24 [dBm] Passed'}
{'Limit 6 [%] Passed' }
{'Limit 30 [%] Passed' }
{'Limits 22 to 24 [dBm] Passed'}
{'Limit 6 [%] Passed' }
{'Limit 30 [%] Passed' }
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Large Files and Big Data についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!