TP-equation-derivees-partie.../TP1/Affichage/SetWait.m
2023-06-10 20:51:59 +02:00

29 lines
615 B
Matlab
Executable file

function [] = SetWait( jvp, n, Kc, KcExp )
global PosWait;
global SizeWait;
global WaitBar;
global PosKc;
global SizeKc;
global KcBar;
present = isempty(PosWait)*isempty(SizeWait)*isempty(WaitBar);
if (present~=0)
return
end
PosWait(3) = max( fix( (jvp/n)*SizeWait ), 1 );
set( WaitBar, 'Position', PosWait, 'Visible', 'on' ); drawnow;
if (nargin > 2)
present = isempty(PosKc)*isempty(SizeKc)*isempty(KcBar);
if (present~=0)
return
end
PosKc(3) = max( fix( (Kc/KcExp)*SizeKc ), 1 );
set( KcBar, 'Position', PosKc, 'Visible', 'on' ); drawnow;
end