How to avoid the repetition of events ?

조회 수: 1 (최근 30일)
parag gupta
parag gupta 2019년 4월 24일
편집: parag gupta 2019년 4월 25일
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