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

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.
I don't think that would work, as each function will run in a different instance of MATLAB runtime.
If the instances are separated, I hope they won't have access to each others memory, so what you are asking is impossible.
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 Exchange에서 Loops 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