help-octave
[Top][All Lists]
Advanced

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

Problem to read table with text and number: Octave MacOSX


From: Riddhiman Sarkar
Subject: Problem to read table with text and number: Octave MacOSX
Date: Thu, 19 Jul 2012 10:05:36 +0200

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







reply via email to

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