[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Octave beginner-reading info from text file
From: |
Zamuel |
Subject: |
Octave beginner-reading info from text file |
Date: |
Tue, 14 Dec 2010 02:16:20 -0800 (PST) |
Hello!
I am a total beginner with Octave with some experience and knowledge from
programming languages.
I am trying to figure out how to read a matrices (total of four) from a text
file called 'example.mat'.
Matrices can exist where ever in a file but they always start with following
lines:
# name: /HOME/AUTO/MEASUREMENT/B
# type: matrix
# rows: 25
# columns: 778
-1798.95 -1319.203 -839.456 -365.3882 93.78099 552.9503 ...
In the "#name" field the last char is always different (A,B,C or D).
Alternatively the same file contains same info in a string form:
$VAR1 = {
'name' => '/HOME/AUTO/MEASUREMENT/',
'data' => [
[
'-1798.95',
'-1319.203',
'-839.456',
'-365.3882',
'-20115.15'
],
[
'-2190.332'
(...)
]
],
'rows' => 25,
'cols' => 778
Personally I don't care from which format I can get the info, I just have to
read it and eventually count the mean from the values.
Could someone help me?
--
View this message in context:
http://octave.1599824.n4.nabble.com/Octave-beginner-reading-info-from-text-file-tp3086763p3086763.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Octave beginner-reading info from text file,
Zamuel <=