Cut radio signal by hours

2 ビュー (過去 30 日間)
Shahar ben ezra
Shahar ben ezra 2020 年 11 月 11 日
コメント済み: Shahar ben ezra 2020 年 11 月 21 日
Hi
I have an excel file
I get in the file a date, hours and amplitude by frequency
How can I "cut" the hours as I wish
For example I want to get a new matrix but only between the hours of 00:00 and 12:00

採用された回答

Walter Roberson
Walter Roberson 2020 年 11 月 11 日
I26 = readtable(YourFileName);
mask = I26.time < hours(12);
selected_I26 = I26(mask,:);
This would extract only the entries before noon. <= if you want to include noon.
  10 件のコメント
Peter Perkins
Peter Perkins 2020 年 11 月 20 日
Walter's solution(s) are correct, but I recommend that for your first spreadsheet, you combine the date and time, and in the second you don't split them apart. Then turn your table into a timetable.
Recent versions of MATLAB have made importing durations more automatic, so you may or may not get durations automatically.
t = readtable("yourFile.xlsx")
t.data = t.data + t.time; % or t.data + duration(t.time)
tt = table2timetable(t(:,[1 4:end],'RowTimes',t.data);
ttMorning = tt(tt.Time.Hour <= 12,:);
Shahar ben ezra
Shahar ben ezra 2020 年 11 月 21 日
Tnx Peter Perkins :)
I will try that too

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by