From 32ac07c90a081664cc4473598f2b4f6b86e6f737 Mon Sep 17 00:00:00 2001 From: Yves Gouriou <yves.gouriou@ird.fr> Date: Fri, 22 Nov 2013 12:52:32 +0000 Subject: [PATCH] =?UTF-8?q?Pb=20lorsque=20le=20tableau=20"freq"=20ne=20con?= =?UTF-8?q?tient=20pas=202=20=C3=A9l=C3=A8ments=20if=20size(freq,1)=20=3D?= =?UTF-8?q?=3D=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tsg_io/readTsgDataLabview.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tsg_io/readTsgDataLabview.m b/tsg_io/readTsgDataLabview.m index c30bf52..2669392 100644 --- a/tsg_io/readTsgDataLabview.m +++ b/tsg_io/readTsgDataLabview.m @@ -126,7 +126,7 @@ if fid ~= -1 % loop on all TsgRaw data % ----------------------- for i=1:nbrecords - + % remove leading and trailing white space when string contain NaN % --------------------------------------------------------------- if ~strcmp(strtrim(TsgRaw(i,:)), 'NaN') @@ -139,8 +139,10 @@ if fid ~= -1 % -------------------- if isempty( errmsg ) if ~isempty( freq ) - ssjt_freq(i) = freq(1)/19 + 2100; - cndc_freq(i) = sqrt(freq(2)*2100 + 6250000); + if size(freq,1) == 2 + ssjt_freq(i) = freq(1)/19 + 2100; + cndc_freq(i) = sqrt(freq(2)*2100 + 6250000); + end end else sprintf( '\n Function readTsgDataLabview' ); -- GitLab