how can i define specific sample time points?
古いコメントを表示
i want to sample a step in simulink. But i want to define at which point my step is sampled how can i define a vector with the timepoints?
e.g. my simulation runs 1sec.
Then i want to sample the simulation e.g. at [0.01, 0.02, 0.03, 0.05, 0.09, 0.15, 0.3 .... ]
is this possible and how?
edit: is it possible to set the Solver to inherited (-1)
And i put a triggerblock into my simulinkmodel to specify when my model samples? Could this be a solution? If yes how can i realise it?
4 件のコメント
David Miller
2016 年 7 月 2 日
Let T be an array of certain time steps you would like to sample. Let your time step be min(abs(b-a)), where b and a are in T. Call this value t, then:
for dt = 0:t:1
simulation*t;
if ismember(i,T)
*sample*
end
end
Walter Roberson
2016 年 7 月 2 日
That does not sound like a Simulink based solution ?
Timo
2016 年 7 月 4 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Simulink Design Optimization についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

