Write to same mat file from multiple compiled functions

I am compiling multiple functions (using MCC) to retrieve data from a MySQL server in order to parallelize the process. Each function will write data to a mat file. Is there a way I can check if the mat file is not in memory of another function before loading it.

4 件のコメント

Rik
Rik 2018 年 1 月 7 日
My first thought would be that global variables could solve this. My second thought is that global variables can generally be avoided in favor of a more robust solution.
Afzal Ali
Afzal Ali 2018 年 1 月 7 日
I don't think that would work, as each function will run in a different instance of MATLAB runtime.
Rik
Rik 2018 年 1 月 7 日
If the instances are separated, I hope they won't have access to each others memory, so what you are asking is impossible.
Afzal Ali
Afzal Ali 2018 年 1 月 7 日
Is there some way to lock a mat file, so I can have a while loop checking when I should load it.

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

回答 (1 件)

Sindhu Yerragunta
Sindhu Yerragunta 2018 年 1 月 10 日
編集済み: Sindhu Yerragunta 2018 年 1 月 10 日

0 投票

Hi Afzal,
This link might help to proceed further
Regards,
Sindhu

カテゴリ

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

製品

タグ

質問済み:

2018 年 1 月 7 日

編集済み:

2018 年 1 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by