Hi everybody,
I want to create a 'Start'- button that opens the connected webcam and displays the video in an UI-Axes. If i clicked 'start', the button should change to 'stop' so that I can press it again to stop the camera. So far I've got 2 different buttons programmed.
Can anyone help me to connect these two buttons?
Thanks a lot for your help!
Best regards.

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2021년 5월 5일
편집: Fangjun Jiang 2021년 5월 5일

0 개 추천

For fun, one-liner
uibutton('Text','Start','ButtonPushedFcn','set(gcbo,''text'',setdiff(["Start","Stop"],get(gcbo,''text'')))')
The general approach is, in your callback function of the button, get and set the text of the button.

카테고리

도움말 센터File Exchange에서 Desktop에 대해 자세히 알아보기

질문:

2021년 5월 5일

편집:

2021년 5월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by