execution order

20 ビュー (過去 30 日間)
Baba
Baba 2011 年 11 月 17 日
What is the easiest way to control execution order of your code?
i have a function that creates an array of numbers and then I have a for loop that needs to use some numbers from that array. but the for loop seesms to be executing first.
  4 件のコメント
Baba
Baba 2011 年 11 月 17 日
thank you!

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

採用された回答

Jan
Jan 2011 年 11 月 17 日
Matlab executes the code line by line in serial order. Inside a line the commands are executed from left to right.
Callbacks and timer functions are processed, if the command prompt is reached, or if PAUSE or DRAWNOW trigger their execution.
I do not see any possibilities to influence the order of execution.
  7 件のコメント
Jan
Jan 2011 年 11 月 17 日
@Jonathan: Exactly. Inside a line the precedence order rules, but for the same precedence the left operation is performed at first.

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by