フィルターのクリア

Switch Value not changing in matlab app designer function

4 ビュー (過去 30 日間)
UMAIR RASOOL
UMAIR RASOOL 2021 年 5 月 2 日
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 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by