Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CRP Toolbox for MATLAB
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Norbert Marwan
CRP Toolbox for MATLAB
Commits
2409f4ff
Commit
2409f4ff
authored
19 years ago
by
marwan
Browse files
Options
Downloads
Patches
Plain Diff
small speed up by using simpler commands
parent
ab847594
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
waitbar.m
+7
-7
7 additions, 7 deletions
waitbar.m
with
7 additions
and
7 deletions
waitbar.m
+
7
−
7
View file @
2409f4ff
...
@@ -42,7 +42,7 @@ function fout = waitbar(x,whichbar, varargin)
...
@@ -42,7 +42,7 @@ function fout = waitbar(x,whichbar, varargin)
% Vlad Kolesnikov 06-7-99
% Vlad Kolesnikov 06-7-99
% Copyright 1984-2000 The MathWorks, Inc.
% Copyright 1984-2000 The MathWorks, Inc.
% $Revision$ $Date$
% $Revision$ $Date$
% Modified: Norbert Marwan, 2002-12-11, 2004-07-28, 2004-10-25
% Modified: Norbert Marwan, 2002-12-11, 2004-07-28, 2004-10-25
, 2005-09-13
if
nargin
>=
2
if
nargin
>=
2
...
@@ -75,7 +75,7 @@ switch type
...
@@ -75,7 +75,7 @@ switch type
case
1
,
% waitbar(x) update
case
1
,
% waitbar(x) update
p
=
findobj
(
f
,
'Type'
,
'patch'
);
p
=
findobj
(
f
,
'Type'
,
'patch'
);
pr
=
findobj
(
f
,
'Type'
,
'text'
);
pr
=
pr
(
1
);
pr
=
findobj
(
f
,
'Type'
,
'text'
);
pr
=
pr
(
1
);
if
isempty
(
f
)
|
isempty
(
p
)
|
isempty
(
pr
)
if
isempty
(
f
)
|
|
isempty
(
p
)
|
|
isempty
(
pr
)
error
(
'Couldn
''
t find waitbar handles.'
);
error
(
'Couldn
''
t find waitbar handles.'
);
end
end
...
@@ -89,7 +89,7 @@ switch type
...
@@ -89,7 +89,7 @@ switch type
end
end
timeRemain
=
[];
timeRemain
=
[];
if
(
secRemain
>
lastUpdate
.
showTime
|
lastUpdate
.
flag
)
&
lastUpdate
.
showTime
>=
0
if
(
secRemain
>
lastUpdate
.
showTime
|
|
lastUpdate
.
flag
)
&
&
lastUpdate
.
showTime
>=
0
tx
=
datestr
(
datenum
(
0
,
0
,
0
,
0
,
0
,
secRemain
),
13
);
tx
=
datestr
(
datenum
(
0
,
0
,
0
,
0
,
0
,
secRemain
),
13
);
if
secRemain
>
86400
if
secRemain
>
86400
tx
=
[
datestr
(
datenum
(
0
,
0
,
0
,
0
,
0
,
secRemain
),
7
),
'd:'
,
datestr
(
datenum
(
0
,
0
,
0
,
0
,
0
,
secRemain
),
13
)];
tx
=
[
datestr
(
datenum
(
0
,
0
,
0
,
0
,
0
,
secRemain
),
7
),
'd:'
,
datestr
(
datenum
(
0
,
0
,
0
,
0
,
0
,
secRemain
),
13
)];
...
@@ -176,7 +176,7 @@ switch type
...
@@ -176,7 +176,7 @@ switch type
cancelBtnCreated
=
0
;
cancelBtnCreated
=
0
;
for
ii
=
1
:
length
(
propList
)
for
ii
=
1
:
length
(
propList
)
try
try
if
strcmp
(
lower
(
propList
{
ii
}
)
,
'createcancelbtn'
)
&
~
cancelBtnCreated
if
strcmp
i
(
propList
{
ii
},
'createcancelbtn'
)
&
&
~
cancelBtnCreated
cancelBtnHeight
=
23
*
pointsPerPixel
;
cancelBtnHeight
=
23
*
pointsPerPixel
;
cancelBtnWidth
=
60
*
pointsPerPixel
;
cancelBtnWidth
=
60
*
pointsPerPixel
;
newPos
=
pos
;
newPos
=
pos
;
...
@@ -243,9 +243,9 @@ switch type
...
@@ -243,9 +243,9 @@ switch type
if
titleHeight
>
pos
(
4
)
if
titleHeight
>
pos
(
4
)
pos
(
4
)
=
titleHeight
;
pos
(
4
)
=
titleHeight
;
pos
(
2
)
=
screenSize
(
4
)/
2
-
pos
(
4
)/
2
;
pos
(
2
)
=
screenSize
(
4
)/
2
-
pos
(
4
)/
2
;
figPosDirty
=
logical
(
1
)
;
figPosDirty
=
true
;
else
else
figPosDirty
=
logical
(
0
)
;
figPosDirty
=
false
;
end
end
if
tExtent
(
3
)
>
pos
(
3
)
*
1.10
;
if
tExtent
(
3
)
>
pos
(
3
)
*
1.10
;
...
@@ -255,7 +255,7 @@ switch type
...
@@ -255,7 +255,7 @@ switch type
axPos
([
1
,
3
])
=
axNorm
([
1
,
3
])
*
pos
(
3
);
axPos
([
1
,
3
])
=
axNorm
([
1
,
3
])
*
pos
(
3
);
set
(
h
,
'Position'
,
axPos
);
set
(
h
,
'Position'
,
axPos
);
figPosDirty
=
logical
(
1
)
;
figPosDirty
=
true
;
end
end
if
figPosDirty
if
figPosDirty
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment