octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #50102] dlmread crashing the interpreter on Cy


From: Rik
Subject: [Octave-bug-tracker] [bug #50102] dlmread crashing the interpreter on Cygwin
Date: Sun, 19 Mar 2017 10:56:50 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #17, bug #50102 (project octave):

If no delimiter is found then cmax is not incremented; But this is the correct
behavior for corner cases.  For example, create a text file with a few
newlines and use dlmread on it.  It will return '[]' because the file was
empty.  However if you increment cmax to 1 then it will return a '0' for each
line because it thought there was at least one column of data when there
really wasn't.

With a test file 'abc' of three newlines


octave:1> z = dlmread ('abc')
z = [](32x0)


It is a very minor nit, but it would be better to return a 0x0 empty matrix in
this case.

Secondly, the resize function does accepts a zero as input without problem. 
In the Octave interpreter,


octave:1> x = magic(3)
x =

   8   1   6
   3   5   7
   4   9   2

octave:2> resize (x, 3,0)
ans = [](3x0)




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50102>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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