How do I free up terminal for a script to keep running, i.e. run a script in two places at once?
    조회 수: 8 (최근 30일)
  
       이전 댓글 표시
    
I have a camera connected to my computer which, for it to take a video, runs a function that is along the lines of:
 function video(camera)
  while X
    camera.takePicture();
    drawnow;
  end
 end
My main driver script is along the lines of:
camera.video;
%do stuff that changes the images and what the camera sees
I want the camera to be running while the rest of the script is running so I can see what is going on.
Anyone have an easy way of doing this? I don't want to overkill.
댓글 수: 0
채택된 답변
  Matt Macaulay
      
 2018년 6월 28일
        I don't think it's possible to have the script run at two places at once. However a quick workaround would be to move the while loop to the main driver script:
while X
    camera.video;
    %do stuff that changes the images and what the camera sees
end
and so the video function is now only
function video(camera)
    camera.takePicture();
    drawnow;
 end
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File 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!

