[Top][All Lists]

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

extracting value from a vector

From: Alain Baeckeroot
Subject: extracting value from a vector
Date: Tue, 21 Apr 2009 16:44:21 +0200
User-agent: KMail/1.9.9


A trivial question, but i don't find the answer in the doc.
i would like to assign value of a vector individually to some variables.
 octave> v = [ 1.4 , 2.7, 3.1 ]

This fails : octave> [ a, b, c ] = v;
everything goes in 'a', and b is undefined.

Is it necessary to write a = v(1); b = v(2) ...
or did i missed something ?


reply via email to

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