Running two scripts synchronously

조회 수: 3 (최근 30일)
Yanjika O
Yanjika O 2020년 6월 13일
댓글: Mohammad Sami 2020년 6월 13일
Hi,
Is it possible to run two scripts at the same time? For example, generating video on the screen and recording a video through usb camera both starting from same time and finishes same time.
Thank you.
  댓글 수: 1
Mohammad Sami
Mohammad Sami 2020년 6월 13일
Does it matter if you record a few seconds of extra video before and after ? You can just setup and start your recording. Then generate the video. Finally stop the recording.

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

채택된 답변

Walter Roberson
Walter Roberson 2020년 6월 13일
Yes? No?
Synchronizing events precisely turns out to be very hard. There are theoretical arguments to the effect that there are circumstances under which it is literally impossible, that "cause and effect" break down in some cases, and that somes it is not possible to definitely say whether one event occurs before or after another event.
That said... the less precise you need to be on the synchronization, the easier it gets. For example, you could probably synchronize two such scripts to within less than half an hour provided that you do not route the signal out past Jupiter and back. Realistic problems can start showing up at synchronizing to less than 20 seconds.
If you wanted to synchronize to less than one frame at (say) 20 frames per second, then you would probably have trouble doing that.
  댓글 수: 1
madhan ravi
madhan ravi 2020년 6월 13일
MATLAB is definitely not built for parallel computing unlike LabView.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for USB Webcams에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by