time-dependant iteration through a loop?

Hello
I am running a function with some subprocess that may take too long
I would like to advance to the next value of "n", if this subprocess takes too long.
for example below, after running TRYME_RUN(0.6,0.1) fro one hour, I would like to move to TRYME_RUN(0.6,0.2)
I tried various timer and 'while'/'if' tic toc but once it starts TRYME_RUN it does not go out...
Sorry in advance if I am note clear. Any help would be greatly appreciated ++
a
function MYFUNCTION
for alpha= [0.6]
for beta= [0.1 0.2 0.3]
TRYME_RUN(alpha,beta)
end
end

5 件のコメント

Jacob Wood
Jacob Wood 2020 年 2 月 23 日
Can you edit the code inside TRYME_RUN?
John D'Errico
John D'Errico 2020 年 2 月 23 日
Please stop adding answers every time you make a comment. Moved answer to a comment:
"yes but this is quite complex with nested functions"
antoine
antoine 2020 年 2 月 23 日
sorry
John D'Errico
John D'Errico 2020 年 2 月 23 日
As for making your code run faster, or stop after a period of time, only you can control that, since it is you who wrote the code and we cannot see the code.
Pravin Jagtap
Pravin Jagtap 2020 年 2 月 25 日
As mentioned in the above comments, we need access to TRYME_RUN function. Can we edit that function?

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

製品

リリース

R2019a

質問済み:

2020 年 2 月 22 日

コメント済み:

2020 年 2 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by