Switch Value not changing in matlab app designer function
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi i would like to have suggestions about how can i monitor the value of a switch in Matlab app desinger..i have a while loop to count the frames of video and want to break the loop when the switch value is paused. here is my code. the problem is that the switch value is not changing as the loop runs but it should.
function Camera_number(app,Cam_no)
Mode=app.Switch.Value;
if(strcmp(Mode,'Play'))
Option=0;
else
Option=1
end
switch Option
case 0
if strcmp(Cam_no,'Cam1')
temp=zeros(1,5);
j=1;
Frnu=app.FamraNumer;
while (Frnu<99)
sw=app.Switch.Value
if(strcmp(sw,'pause'))
break;
else
image(app.UIAxes2,app.Frames(:,:,:,Frnu));
k=j;
while j<k+4
temp=[temp,app.Data(j,:)];
j=j+1;
plot(app.UIAxes,temp,'ko')
end
Frnu=Frnu+1
pause(.1);
end
plot(app.UIAxes,temp)
end
end
end
end
end
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!