Switch Value not changing in matlab app designer function
2 views (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
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!