フィルターのクリア

How to select a value from a footer of a text file

1 回表示 (過去 30 日間)
Ebtesam Farid
Ebtesam Farid 2020 年 12 月 8 日
コメント済み: Ebtesam Farid 2020 年 12 月 8 日
Hello
please I have a text fie (of Radiosonde data) -- attached , it contains a header then a number of coulmns of data then some information about the measurements at the end of the file
I want to select a line at the end of the file starting with the (Precipitable water [mm]) then select the value attached to the line.
I tried to use textscan, but useless, I had error message when I specified all the line of data in the Header part of the command.
any advice/help please.
Thanks

採用された回答

Kojiro Saito
Kojiro Saito 2020 年 12 月 8 日
You can extract the data by extractBetween. Here is a snippet.
str = fileread('cor_2017_1_1_00.txt');
extractedStr = extractBetween(str, 'Precipitable water [mm] for entire sounding: ', '</PRE>');
data = str2double(extractedStr{:});
You will get the value 1.62 in data variable.
  1 件のコメント
Ebtesam Farid
Ebtesam Farid 2020 年 12 月 8 日
Thanks so much :D
it works well

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeElectrophysiology についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by