help-octave
[Top][All Lists]
Advanced

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

Importing columns as a matrix


From: \"Niedermayr, Arthur\"
Subject: Importing columns as a matrix
Date: Thu, 01 Jun 2017 18:56:23 -0400

Hello everybody,

I basically want to import with GNU Octave a matrix of numbers.

It consists of 132651 values which equals 51x51x51 (later I want to reshape my matrix with
reshape(Matrix,51,51,51))

The problem is the format of my data file that I want to import:
it consists of 6 columns like the following example shows:

1.value      2.value      3.value      4.value    5.value    6.value
...
...
...
132649.value 132650.value 132651.value  no-value  no-value   no-value

So the last 3 values of my 6 x 22109 array are empty (6x22109-3=132651). If they would be ignored everything would be perfect.

My data-import command is the following:
my_textfile=load ("-ascii", "6-columns.txt");

But due to the fact that 3 values are missing, I get the following error:
error: load: 6-columns.txt: inconsistent number of columns near line 22109

Is there a simple workaround for that?
Every help is really appreciated! Thank you in advance!

Best regards
Arthur Niedermayr




reply via email to

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