From 4c2dad453d78eb2cca514cf0fe6d2f8932f80371 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Mon, 5 Jan 2015 16:00:42 -0500 Subject: [PATCH] modified importfile.m so headers so log files with headers can be loaded, fixed getPrecisionRecall.m for a "*=" error by MATLAB --- Matlab/ShowLogs/getPrecisionRecall.m | 2 +- Matlab/ShowLogs/importfile.m | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Matlab/ShowLogs/getPrecisionRecall.m b/Matlab/ShowLogs/getPrecisionRecall.m index fffb816c..41304a95 100644 --- a/Matlab/ShowLogs/getPrecisionRecall.m +++ b/Matlab/ShowLogs/getPrecisionRecall.m @@ -17,7 +17,7 @@ if exist(GT_file, 'file') display(['Loading GroundTruth ''' GT_file ''' ...']); GroundTruth = imread(GT_file); if max(max(GroundTruth)) == 1 - GroundTruth*=255; + GroundTruth=GroundTruth*255; end else error(['The ground truth ''' GT_file '''doesn''t exist.']) diff --git a/Matlab/ShowLogs/importfile.m b/Matlab/ShowLogs/importfile.m index 50894959..a8044590 100644 --- a/Matlab/ShowLogs/importfile.m +++ b/Matlab/ShowLogs/importfile.m @@ -8,6 +8,10 @@ function [Data] = importfile(fileToRead1) % Import the file rawData1 = importdata(fileToRead1); +if isstruct(rawData1) + rawData1=rawData1.data; +end + % For some simple files (such as a CSV or JPEG files), IMPORTDATA might % return a simple array. If so, generate a structure so that the output % matches that from the Import Wizard.