From 7d2785f5ee249590eb0a310ca23e753a5c3b7b73 Mon Sep 17 00:00:00 2001 From: craig-warren Date: Mon, 18 Jan 2016 21:54:26 +0000 Subject: [PATCH] Updated to correct reading of new file attribute names. --- tools/MATLAB scripts/plot_Ascan.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/MATLAB scripts/plot_Ascan.m b/tools/MATLAB scripts/plot_Ascan.m index 0e48cbef..9b22b5ed 100644 --- a/tools/MATLAB scripts/plot_Ascan.m +++ b/tools/MATLAB scripts/plot_Ascan.m @@ -16,7 +16,7 @@ if filename ~= 0 header.dy = tmp(2); header.dz = tmp(3); header.dt = h5readatt(fullfilename, '/', 'dt'); - header.ntx = h5readatt(fullfilename, '/', 'ntx'); + header.nsrc = h5readatt(fullfilename, '/', 'nsrc'); header.nrx = h5readatt(fullfilename, '/', 'nrx'); % Time vector for plotting @@ -35,11 +35,12 @@ if filename ~= 0 % Save and plot fields from each receiver for n=1:header.nrx - path = strcat('/rxs/rx', num2str(n), '/'); - tmp = h5read(fullfilename, strcat(path, 'Position')); + path = strcat('/rxs/rx', num2str(n)); + tmp = h5readatt(fullfilename, path, 'Position'); header.rx(n) = tmp(1); header.ry(n) = tmp(2); header.rz(n) = tmp(3); + path = strcat(path, '/'); fields.ex(:,n) = h5read(fullfilename, strcat(path, 'Ex')); fields.ey(:,n) = h5read(fullfilename, strcat(path, 'Ey')); fields.ez(:,n) = h5read(fullfilename, strcat(path, 'Ez'));