Chop vectors in between a specific time range?
1 回表示 (過去 30 日間)
古いコメントを表示
I run a simulation in Matlab/Simulink for 10 seconds and the output data is stored in the workspace.
But I need to save data between 5 to 10 seconds to the workspace.
How is this possible ?
0 件のコメント
採用された回答
K E
2012 年 8 月 20 日
編集済み: K E
2012 年 8 月 20 日
I think you are running a Simulink model and outputting values for your entire 10-second simulation using the To Workspace block. In Matlab, you can then extract the data collected between 5-10 seconds from your saved value as follows. Let us say you rename your time variable timeSimulation and your dependant variable temperature.
temperatureExtracted = temperature(timeSimuation >= 5 & timeSimulation <= 10) ;
If this is not what you want to do, please provide more specifics as Jan suggested.
0 件のコメント
その他の回答 (2 件)
Jan
2012 年 8 月 19 日
Omit the first interval before 5.
Currently the lack of details in the question does not allow a more precise suggestion.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Sources についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!