Switch Value not changing in matlab app designer function
4 次查看(过去 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!