where do i need to consider time delay in code?

4 ビュー (過去 30 日間)
ADNAN KIRAL
ADNAN KIRAL 2018 年 11 月 27 日
コメント済み: ADNAN KIRAL 2018 年 11 月 27 日
hi guys,
where should i consider time delay in my code? is that in my function or in my solver part (ode45) ? also, how can i check time delay i have assigned is correct? any command in matlab ? thanks.

回答 (1 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2018 年 11 月 27 日
編集済み: KALYAN ACHARJYA 2018 年 11 月 27 日
Time delay (pause) assign depends on your algorithm, why time delay?
Regarding check delay, you can in multiple ways, one way using finddelay
If you calling function, hopefull you calculate the delay befor and after function exucation, otherwise you can assigned delay calculation anywhere within the code.
Suppose
x1=....
y=function_call
x2=...
D=finddelay(x1,x2)
Also you can measure elasped time in between using tic toc
tic;
%your code.
toc;

カテゴリ

Help Center および File ExchangePulsed Waveforms についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by