?????

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

?????

rubin-7
HELP, HELP!!!
How does one load a matrix (text file 'data.dat', size: N X M) into octave?
In matlab there is a  commmand load data.dat and x=data(:,i) assigns column i
to vector x. What are the equivalent commands in OCTAVE?  
Irene
[hidden email]

Reply | Threaded
Open this post in threaded view
|

?????

John W. Eaton-6
On  4-Feb-1997, [hidden email] <[hidden email]> wrote:

| HELP, HELP!!!
| How does one load a matrix (text file 'data.dat', size: N X M) into octave?
| In matlab there is a  commmand load data.dat and x=data(:,i) assigns column i
| to vector x. What are the equivalent commands in OCTAVE?  

These commands should work fine with Octave 2.x.

  $ cat foo.dat
  1 2 3 4
  5 6 7 8
  4 3 2 1
  $ octave
  Octave, version 2.0.2 (i586-pc-linux-gnu).
  Copyright (C) 1996 John W. Eaton.
  This is free software with ABSOLUTELY NO WARRANTY.
  For details, type `warranty'.

  octave:1> load foo.dat
  octave:2> foo
  foo =

    1  2  3  4
    5  6  7  8
    4  3  2  1

  octave:3> x = foo (:, 1)
  x =

    1
    5
    4


jwe