フィルターのクリア

Find max values within a defined range for each column and rows of a matrix

3 ビュー (過去 30 日間)
Askeladden2
Askeladden2 2021 年 11 月 15 日
編集済み: dpb 2021 年 11 月 17 日
Hi!
I have a 20x305471 matrix, representing 20 variables in a time series sampled at 28.28 Hz. I have also have a time vector (1x305471) = [0, 0.0354, …. And up to 10800];
I want to extract maximum values using different time ranges. E.g. I want to find the maximum values from 0 to 40 min, 40 to 120min.. up to 160 to 180min.
Any help is very appreciated! Thanks

採用された回答

dpb
dpb 2021 年 11 月 15 日
Turn into a timetable and use retime
  5 件のコメント
Askeladden2
Askeladden2 2021 年 11 月 17 日
I need to convert them back into an array because I am using the values for creating probability distributions and etc.
dpb
dpb 2021 年 11 月 17 日
編集済み: dpb 2021 年 11 月 17 日
Just reference the desired variables directly from the table/timetable -- no need to create separate, duplicates as arrays.
See the section on the table data class on how to reference into a table for the myriad of available addressing syntaxes. To return just a variable, the "dot" notation is painless and efficient...
ttMyTT=table2timetable(readtable('myfile.ext'));
plot(ttMyTT.time,ttMyTT.VarX)
No auxiliary arrays in sight/needed...use your own variable names in the data file, of course.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by