[App Designer]how to make endless loop program.

조회 수: 75(최근 30일)
Jae-Hee Park
Jae-Hee Park 2021년 12월 21일
답변: Jae-Hee Park 2021년 12월 23일
I want to create an app that continuously receives input and displays new images.
If I simply put a function that creates an image like below,
function make_image()
the program seems to freeze. How should I design it?
  댓글 수: 5
Jae-Hee Park
Jae-Hee Park 2021년 12월 23일
@Geoff Hayes Thank you!

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

채택된 답변

Jae-Hee Park
Jae-Hee Park 2021년 12월 23일
Geoff Hayes 2021년 12월 21일 13:12
@Jae-Hee Park - why is a while loop needed? When the new data is received, draw the image then. The problem with the while loop is that your code will become "stuck" within it and no other action (GUI button press, callback, etc.) will be called unless you make the loop interruptible by introducing a pause or the drawnow like @Benjamin suggests.

추가 답변(0개)


Find more on Develop Apps Using App Designer in Help Center and File Exchange


Community Treasure Hunt

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

Start Hunting!

Translated by