How to avoid the repetition of events ?

1 次查看(过去 30 天)
I am using dde23 solver.
p = sol.ie()
p = 6 4 2 3 1 17 17 21 21 27
I dont want the same event to happen again.What to do to avoid the repetition of same event?
For eg I dont want 17th event should happen 2 time i.e I want it should happen only once.

回答(1 个)

Akira Agata
Akira Agata 2019-4-24
How about using unique function?
p = [6 4 2 3 1 17 17 21 21 27];
p = unique(p,'stable');
The output becomes like this:
>> p
ans =
6 4 2 3 1 17 21 27
  1 个评论
parag gupta
parag gupta 2019-4-25
I was talking about events.I am using dde23 solver so I want same event should not happen again

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by