Re: [Scilab-users] Removing elements of one vector from another vector
Hi Iza Yes, as Dang says ... I think what you're doing is one of several "set-operations" you can do in Scilab. Others may also come in handy for you: https://help.scilab.org/doc/5.5.2/en_US/section_b26c1facefdb399710752631e1bfb765.html /Claus On 16.08.2018 16:55, Izabela Wójcik-Grząba wrote: Hello, 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]. I wonder if this can be done without a "for" loop. Thanks in advance, Iza ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] {EXT} Removing elements of one vector from another vector
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. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
[Scilab-users] Removing elements of one vector from another vector
Hello, 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]. I wonder if this can be done without a "for" loop. Thanks in advance, Iza ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users