script pauses while a generated picture is open

Hello,
I have a script that generates around 10 graphs, while the script is running, two of these graphs (PNGs) are opened so that i can see if the data is good. The problem is that while these pictures are open the script pauses and i have to close image viewer (or quicktime) so that the script can resume. The strange thing is that the person that did this script does not have the same problem, so i guess it must be some setting. Any suggestions? Thanks in advance, Cesar

댓글 수: 3

Doug Hull
Doug Hull 2011년 5월 13일
How are they being opened? What is the MATLAB command?
Are you two using the same operating system?
I'm using XP while he's using windows7
the files are being opened with:
system([foldername 'FlyLegParaDistance.png']);

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2011년 5월 13일

0 개 추천

system() would normally be expected to wait for what it started to return, but the exact action would depend on what the system has configured as the default action for PNG files.
It might help to change the command to
system([foldername 'FlyLegParaDistance.png &']);

댓글 수: 3

Thanks for your answer.
It does solve partially, the script keeps going but I get a new system window that stays open. Not a big deal but annoying.
I don't understand why in another computer that problem does not happen...
The other computer has been configured for a different action to open .png files. You should check the file associations on both machines.
ok, thanks Walter!

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

질문:

2011년 5월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by