diff options
Diffstat (limited to 'SD-VBS/common/matlab/readFile.m')
-rw-r--r-- | SD-VBS/common/matlab/readFile.m | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/SD-VBS/common/matlab/readFile.m b/SD-VBS/common/matlab/readFile.m new file mode 100644 index 0000000..4888103 --- /dev/null +++ b/SD-VBS/common/matlab/readFile.m | |||
@@ -0,0 +1,22 @@ | |||
1 | function fid = readFile(path) | ||
2 | |||
3 | file = fopen(path, 'r'); | ||
4 | |||
5 | full = fscanf(file,'%f'); | ||
6 | elapsed = zeros(1,2); | ||
7 | |||
8 | rows = full(1); | ||
9 | cols = full(2); | ||
10 | fid = zeros(rows, cols); | ||
11 | |||
12 | k = 3; | ||
13 | for i=1:rows | ||
14 | for j =1:cols | ||
15 | fid(i,j) = full(k); | ||
16 | k = k+1; | ||
17 | end | ||
18 | end | ||
19 | fclose(file); | ||
20 | |||
21 | end | ||
22 | |||