How we store an input signal in a timeseries format to an a N element array in simulink

1 回表示 (過去 30 日間)
david lf
david lf 2016 年 10 月 26 日
コメント済み: david lf 2016 年 10 月 27 日
I want to keep only the last 2400 data of a timeseries of 12000 data and store it in a vector. How can i do it in simulink?

回答 (1 件)

Swarooph
Swarooph 2016 年 10 月 26 日
Assuming you are using the 'To Workspace' block to log the Timeseries data, you can use the Limit data points to last option to specify this number. In your case, it will be 2400.
If you are using another apporach to log the Timeseries data, comment on this answer to continue the discussion.
  3 件のコメント
Swarooph
Swarooph 2016 年 10 月 26 日
It would be great if you explain a little more. Are you intending to do moving average
a) Inside the Simulink model, where you are going to take the latest 2400 elements and do a moving average on a signal? OR
b) Outside the model as a post processing step after the simulation has finished?
When you say timeseries data, are you referring to any Simulink signal or an actual Simulink.Timeseries data? Because, based on what it is, the answer might be simple enough or more complicated than we think. So please provide as much detail as you can.
david lf
david lf 2016 年 10 月 27 日
thanks for your help, finally i found a way to resolve my problem

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

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by