<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hello Richard,<br>
<br>
Le 17/11/2017 à 17:41, Richard llom a écrit :<br>
</div>
<blockquote cite="mid:1510936915808-0.post@n3.nabble.com"
type="cite">
<pre wrap="">Hello,
I'm trying to read in a file with whitespace separated values, with
[log_data, comments] = csvRead(log_file,ascii(32),'.','double');
However I'm constantly getting this error:
Warning: Inconsistency found in the columns. At line 2, found 11 columns
while the previous had 5.
but with changing column numbers...
Any clue whats going on?</pre>
</blockquote>
<br>
Using space as a column separator is a very bad choice. For
instance, in the sample that you have posted, the 3 consecutive
following rows<br>
<br>
<blockquote cite="mid:1510936915808-0.post@n3.nabble.com"
type="cite">
<pre wrap="">16800 23200 1 1 10 -3.4 1005 151 4.0 5 2.6 8<font color="#ff0000">9 1</font> 28 230 -282 2
16800 23200 1 1 11 -3.1 1004 129 3.5 6 2.6 8<font color="#ff0000">6 32</font> 70 247 -285 2
16800 23200 1 1 12 -1.4 1004 148 5.2 4 2.6 8<font color="#ff0000">0 146</font> 54 245 -289 2</pre>
</blockquote>
<br>
are then read by csvRead() as (if "," were the separator instead)<br>
16800,23200,,1,,1,10,,-3.4,1005,151,,4.0 5,,2.6,,89,,<font
color="#ff0000" size="+2">,,</font>1,,,28,230,-282,,2<br>
16800,23200,,1,,1,11,,-3.1,1004,129,,3.5 6,,2.6,,86,,<font
color="#ff0000" size="+2">,</font>32,,,70,247,-285,,2<br>
16800,23200,,1,,1,12,,-1.4,1004,148,,5.2
4,,2.6,,80,,146,,,54,245,-289,,2<br>
<br>
with many empty columns and a shift, that yields an expected error.<br>
So, there is no bug here from csvRead(). As noted by Rafael,
csvRead() does not fit to the<br>
job here. Since your data are only numerical, fscanfMat() should
work instead, indeed.<br>
<br>
Samuel<br>
<br>
</body>
</html>