diff options
author | leochanj105 <leochanj@live.unc.edu> | 2020-10-19 23:09:30 -0400 |
---|---|---|
committer | leochanj105 <leochanj@live.unc.edu> | 2020-10-20 02:40:39 -0400 |
commit | f618466c25d43f3bae9e40920273bf77de1e1149 (patch) | |
tree | 460e739e2165b8a9c37a9c7ab1b60f5874903543 /SD-VBS/common/matlab/readFile.m | |
parent | 47ced4e96bbb782b9e780e8f2cfc637b2c21ff44 (diff) |
initial sd-vbs
initial sd-vbs
add sd-vbs
sd-vbs
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 | |||