[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #42022] dlmread: A(I,J): column index out of b

From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #42022] dlmread: A(I,J): column index out of bounds; value 2 out of bound 1
Date: Fri, 14 Oct 2016 12:40:47 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0

Follow-up Comment #3, bug #42022 (project octave):

(Just intermediate result, I have had no time to dive into importdata.m again,
so here are just Matlab results)

Matlab r2016b gives:

>> dlmread ('bug42022.txt', '')
Error using dlmread (line 147)
Mismatch between file and format character vector.
Trouble reading 'Numeric' field from file (row number 1, field number 1) ==>

Note that Matlab doesn't accept 'emptyvalue'. Specifying a comas as separator
makes no difference.

Octave-4.3.0+ does (specifying a comma as delimiter, ):

>> dlmread ("bug42022.txt", ",", 0, 1, "emptyvalue", NaN)
ans =


which looks to be all right if not better than expected or Matlab (given that
dlmread cannot read non-numeric data).

Specifying an empty string (indicating dlmread should assess the delimiter
itself) gives:

>> dlmread ("bug42022.txt", "", 0, 1, "emptyvalue", NaN)
error: index (_,2): but object has size 6x1

so dlmread apparently has trouble finding out the separator character.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]