help-octave
[Top][All Lists]
Advanced

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

Re: How to input tabular data through a form?


From: Henry F. Mollet
Subject: Re: How to input tabular data through a form?
Date: Wed, 22 Jan 2003 20:41:55 -0800
User-agent: Microsoft-Entourage/10.1.1.2418

octave:4> fid=fopen('Workbook1.csv');
octave:5> a=fscanf(fid,"%f,%f,%f\r",[3,inf])
a =

  1  4  7
  2  5  8
  3  6  9

Finally! Also thanks for hint on how large/complicated a matrix can be.
Henry


on 1/22/03 7:45 PM, Dmitri A. Sergatskov at address@hidden wrote:

> On Wed, 22 Jan 2003, Henry F. Mollet wrote:
> 
>> and really need a menu as an aid. It's so much easier to be able to
>> highlight a matrix in a spreadsheet and then use the menu to ask for the
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> Provided that the matrix is not something like:
> octave:212> whos a
> 
> *** local user variables:
> 
> prot  type                       rows   cols  name
> ====  ====                       ====   ====  ====
> rwd  matrix                       10 606907  a
> 
> (and that is not an extreme example -- just happens to be the matrix
> I am working with at the moment)
> 
>> octave:5> fid=fopen('Workbook.cvs');
>> octave:6> a=fscanf(fid,"%f,%f,%f\r",[3,inf])
>> error: fscanf: invalid stream number = -1
>        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> The fid is invalid. I looked at your early posts and the file name
> was Workbook1.cvs (I forgot about the '1').
> 
>> on 1/22/03 3:14 PM, Dmitri A. Sergatskov at address@hidden wrote:
>> 
>>> You can also try with original "Workbook.cvs" file the following
>>> 
>>> fid=fopen('Workbook.cvs');
>>> a=fscanf(fid,"%f,%f,%f\r",[3,inf])
>>>                     ^^
>>> Note explicit '\r' here
>>> 
>>> If it works you would not need to convert the files...
>>> 
>>> It worked for me, but I am not on Mac.
>>> 
>>> Regards,
>>> 
>>> Dmitri.
>>> 
> 
> Regards,
> 
> Dmitri.
> 
> 
> 
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
> 
> Octave's home on the web:  http://www.octave.org
> How to fund new projects:  http://www.octave.org/funding.html
> Subscription information:  http://www.octave.org/archive.html
> -------------------------------------------------------------
> 



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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