Skip to content

Commit

Permalink
Use more verbose, but less fragile syntax to get file size in demo (#3)
Browse files Browse the repository at this point in the history
Responding to comment in FEX
  • Loading branch information
keithfma committed Mar 2, 2020
1 parent f5f653c commit e435d48
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.2.1
0.2.2
12 changes: 8 additions & 4 deletions newmatic_demo.m
Expand Up @@ -60,7 +60,8 @@
fprintf('Native-complete, read: %.3f s\n', native_complete_read_time);

% get the file size
native_complete_file_size = dir(native_complete_file).bytes/1024/1024;
native_complete_file_obj = dir(native_complete_file);
native_complete_file_size = native_complete_file_obj.bytes/1024/1024;


%% Partial read/write with native MATLAB tools
Expand Down Expand Up @@ -97,7 +98,8 @@
fprintf('Native-partial, read: %.3f s\n', native_partial_read_time);

% get the file size
native_partial_file_size = dir(native_partial_file).bytes/1024/1024;
native_partial_file_obj = dir(native_partial_file);
native_partial_file_size = native_partial_file_obj.bytes/1024/1024;


%% Partial read/write with newmatic
Expand Down Expand Up @@ -132,7 +134,8 @@
fprintf('Newmatic-partial, read: %.3f s\n', newmatic_partial_read_time);

% get the file size
newmatic_partial_file_size = dir(newmatic_partial_file).bytes/1024/1024;
newmatic_partial_file_obj = dir(newmatic_partial_file);
newmatic_partial_file_size = newmatic_partial_file_obj.bytes/1024/1024;


%% Complete read/write with newmatic
Expand Down Expand Up @@ -161,7 +164,8 @@
fprintf('Newmatic-complete, read: %.3f s\n', newmatic_complete_read_time);

% get the file size
newmatic_complete_file_size = dir(newmatic_complete_file).bytes/1024/1024;
newmatic_complete_file_obj = dir(newmatic_complete_file);
newmatic_complete_file_size = newmatic_complete_file_obj.bytes/1024/1024;


%% Comparison
Expand Down

0 comments on commit e435d48

Please sign in to comment.