help-octave
[Top][All Lists]
Advanced

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

Re: Problem to read table with text and number: Octave MacOSX


From: Ben Abbott
Subject: Re: Problem to read table with text and number: Octave MacOSX
Date: Thu, 19 Jul 2012 07:38:51 -0400

On Jul 19, 2012, at 4:05 AM, Riddhiman Sarkar wrote:

> Hello all,
> I am trying to read a table with text and floating numbers and would like to 
> store this as a matrix where I can use those numbers.
> 
> I downloaded the Octave 3.4.0 for MacOSX and I used the textread function to 
> do this and all worked fine. 
> 
> But later, I needed to use nonlinear fitting functions and the 
> linear-algebra, octave-io packages. I did this by installing macports. What 
> this did, is it changed my main Octave version to 3.2.4. From this time, the 
> textread function behaved in a strange way. It can no more read the table in 
> a correct way. The same program, which worked for Octave 3.4.0, did not work 
> in 3.2.4. At this moment, I am pretty sure that there is a bug in textread 
> function in Octave 3.2.4 with octave-io package. And I did not find a 
> alternative good way to read the table(I tried fgets, but it splits the table 
> into characters and it looks impossible to convert this back to meaningful 
> numbers).
> 
> It would be great if you please let me know how I can use the latest Octave 
> version, and still use the useful packages like linear-algebra or optim etc. 
> I tried to update the macports but it did not help. 
> 
> A demo of the table (I don't want to know beforehand the size of the table) 
> is as follows:
> 
> #MODEL FITTING
> #CREATED ON
> INDEX VARS X Y Z Z_1
> 1 2.5 None 0.1235
> 2 4.0 None 0.001
> 3 3.2 None 0.33
> 
> Thank you very much and best regards,
> ---
> Riddhiman

Using packages for older versions of Octave is not advised.

I recommend you either install the older Octave from Macports, or switch to 
Fink which supports several Octave versions (including the most recent release) 
and provides compatible packages for each of them.

Ben



reply via email to

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