From ea442b9af92c4257ecf87118eddc30fcfe3a9d69 Mon Sep 17 00:00:00 2001 From: Jacques Grelet <jacques.grelet@ird.fr> Date: Fri, 13 Feb 2009 14:36:50 +0000 Subject: [PATCH] can read header line with composed name: eg LE SUROIT --- tsg_io/readAsciiTsg.m | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tsg_io/readAsciiTsg.m b/tsg_io/readAsciiTsg.m index d4e945f..7f51535 100644 --- a/tsg_io/readAsciiTsg.m +++ b/tsg_io/readAsciiTsg.m @@ -76,7 +76,18 @@ while ~OK % ------------------------ ind = strmatch( Para, tsgNames); if ~isempty( ind ) - tsg.(Para) = char( c{1}(2) ); + + % patch added for composed name + % ----------------------------- + a = c{1}(2:end)'; + str=[]; + for i=a + str = sprintf('%s %s', str, char(i)); + end + + % copy to tsg struct & remove leading and trailing white space + % ------------------------------------------------------------ + tsg.(Para) = strtrim(str); end end -- GitLab