Perform Calculations on Data in A Table and Create a New Table

2 ビュー (過去 30 日間)
Isabelle Museck
Isabelle Museck 2024 年 3 月 29 日
コメント済み: Isabelle Museck 2024 年 3 月 29 日
I have Time (from 0-20 secodns in increments of 0.05sec) and Accerometer Data recorded at each 0.05 second interval in a Table and I need to calculate the average standard deviation of the accelrometer data in one second and put it in a new table. Im not sure of the most effiecient way to do this. Any help would be greatly appreciated!
Ex of Data in Table -T
  1 件のコメント
Isabelle Museck
Isabelle Museck 2024 年 3 月 29 日
I meant the std deviation per second not average std deviation

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

採用された回答

Steven Lord
Steven Lord 2024 年 3 月 29 日
I'd likely turn your Time column into a duration array (using the seconds function) then convert your table into a timetable using table2timetable. Once you've done that you can use retime on the timetable to change it to a secondly basis (using the newTimeStep input argument value 'secondly') with @std as the aggregation method (that is in fact the example given for the function handle syntax.)
You could use the "Aggregate Timetable Data and Calculate Mean Values" example on the retime documentation page as an example, just using 'secondly' and @std instead of 'hourly' and 'mean'.

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by