Skip to content

Commit d425fef

Browse files
author
Tim Harder
committed
get_version: move version regex initialization outside of file looping
1 parent c096b48 commit d425fef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

get_version.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
function version = get_version()
22
version = '';
3+
version_regex = '%\s*version: (\S+)';
34

45
% extract version info from main application header
56
fid = fopen('AD9361_Filter_Wizard.m');
67
line = fgets(fid);
78
while strcmp(version, '') && ischar(line)
8-
version_regex = '%\s*version: (\S+)';
99
[tokens, match] = regexpi(line, version_regex, 'tokens', 'match');
1010
if ~isempty(match)
1111
version = tokens{1}{1};

0 commit comments

Comments
 (0)