help-octave
[Top][All Lists]
Advanced

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

?????


From: John W. Eaton
Subject: ?????
Date: Tue, 4 Feb 1997 13:43:29 -0600

On  4-Feb-1997, address@hidden <address@hidden> 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



reply via email to

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