[Scilab-users] {EXT} Removing elements of one vector from another vector
Dang Ngoc Chan, Christophe
Christophe.Dang at sidel.com
Thu Aug 16 17:01:39 CEST 2018
Hello,
> De : Izabela Wójcik-Grzaba
> Envoyé : jeudi 16 août 2018 16:56
>
> Is there any simple way to remove from one vector elements
> which are in another vector. For example:
> a=[1 2 3 4 5 6 7 8]
> b=[1 3 5]
> resulting vector: c=[2 4 6 7 8].
You can try:
// **********
[nb, loc] = members(b, a)
a(loc) = []
// **********
regards
--
Christophe Dang Ngoc Chan
Mechanical calculation engineer
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
More information about the users
mailing list