-
Notifications
You must be signed in to change notification settings - Fork 0
/
processVPFile.m
37 lines (25 loc) · 996 Bytes
/
processVPFile.m
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
31
32
33
34
35
function [ a b c d e ] = processVPFile( vpFile )
vpFile
vanFile = textscan(fopen( vpFile ), '%s');
a = [ 0 0 ];
b = [ 0 0 ];
c = [ 0 0 ];
d = [ 0 0 ];
e = [ 0 0 ];
for i = [7 11 15 19 23],
if strcmp(cell2mat(vanFile{1}(i)), 'a=['),
a = [ str2double(cell2mat(vanFile{1}(i+1))) str2double(cell2mat(vanFile{1}(i+2))) ];
end
if strcmp(cell2mat(vanFile{1}(i)), 'b=['),
b = [ str2double(cell2mat(vanFile{1}(i+1))) str2double(cell2mat(vanFile{1}(i+2))) ];
end
if strcmp(cell2mat(vanFile{1}(i)), 'c=['),
c = [ str2double(cell2mat(vanFile{1}(i+1))) str2double(cell2mat(vanFile{1}(i+2))) ];
end
if strcmp(cell2mat(vanFile{1}(i)), 'd=['),
d = [ str2double(cell2mat(vanFile{1}(i+1))) str2double(cell2mat(vanFile{1}(i+2))) ];
end
if strcmp(cell2mat(vanFile{1}(i)), 'e=['),
e = [ str2double(cell2mat(vanFile{1}(i+1))) str2double(cell2mat(vanFile{1}(i+2))) ];
end
end