[Top][All Lists]

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

textread proeblem

From: Nidjara
Subject: textread proeblem
Date: Tue, 19 Aug 2014 17:14:46 -0700 (PDT)

I'm reading graphwiz .dot file with octave. This is the sample of the file:
digraph G {
1->0  [weight="131932"];
2->1  [weight="259178"];
3->2  [weight="732180"];
4->3  [weight="137337"];
5->1  [weight="521430"];
6->5  [weight="87498"];
7->3  [weight="912756"];
8->1  [weight="191335"];
9->1  [weight="329365"];

I wish to store the first number of every line in vector L1, the second
number in L2 and the third in L3, ignoring the text. For example, I  would
like to have 1 in L1(1), 0 in L2(1) and 131932 in L3(1), after loading the
data. In matlab this code does the trick:

[L1 L2 L3]= textread('','%u %*2s %u [weight="%d"] %*s',
'delimiter',' ;','headerlines',1)

but in octave I get the following error message

error: some element undefined in return list.

Can anyone help me in detecting the problem?


View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

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