1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| f_p=figure('name','Panneau affichage',...
'numbertitle','off',...
'menubar','none',...
'resize','on',...
'color',[0.5 0.5 0.5],...
'position',[120 150 1000 330]);
kk=uicontrol(f_p,'style','pushbutton','position',[400 150 120 30]);
set(kk,'string','affichage');
set(kk,'callback','aff');
nombresdehiculesvoie1=5;
nombresdevehiculesvoie2=10;
f_p4=figure('name','Panneau affichage',...
'numbertitle','off',...
'menubar','none',...
'resize','on',...
'color',[0.5 0.5 0.5],...
'position',[120 150 1000 330]);
if(nombresdehiculesvoie1>nombresdevehiculesvoie2)
message='la voie une est plus libre';
else
message='la voie deux est plus libre';
end
fprintf('%s',message); |
Partager