[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
element extraction from vector
From: |
hassen62 |
Subject: |
element extraction from vector |
Date: |
Sun, 27 Dec 2009 01:20:38 +0100 (CET) |
Hi the Octavers,
I would like to ask you: if we have a vector u of this form:
u=[1 0 0 0 0 -1 0 0 0 0 0 1]';
How we can construct a program that extract two vectors v and w from u, where
the elements of v are 1 and -1, i.e v=[1,-1,1]', and the elements of w are the
number of observations of the elements of v in u, i.e w=[1 6 12]'.
Many thanks in advance.
Hassen.
____________________________________________________
Tables en fĂȘte, recettes parfaites, sorties en goguette tout est sur
http://evenementiel.voila.fr/Noel
- element extraction from vector,
hassen62 <=