Results 1 to 3 of 3

Math Help - Deleting duplicity from a vector

  1. #1
    Newbie
    Joined
    Mar 2010
    Posts
    11

    Deleting duplicity from a vector

    Howdi all,
    I've created a vector with this syntax :
    a=[1 2 3 4 5]
    b = a(end:-1:1)
    c= [a b]

    As you can see, the result is :

    c =

    1 2 3 4 5 5 4 3 2 1

    Is there a code to remove the duplicity of the number '5' ( into - c=[1 2 3 4 5 4 3 2 1])?

    Thanks in advace!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by Geomorphologist View Post
    Howdi all,
    I've created a vector with this syntax :
    a=[1 2 3 4 5]
    b = a(end:-1:1)
    c= [a b]

    As you can see, the result is :

    c =

    1 2 3 4 5 5 4 3 2 1

    Is there a code to remove the duplicity of the number '5' ( into - c=[1 2 3 4 5 4 3 2 1])?

    Thanks in advace!
    >>help unique

    CB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Mar 2010
    Posts
    11
    Thanks, It's working!
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Question about deleting a value of x.
    Posted in the Differential Equations Forum
    Replies: 2
    Last Post: May 26th 2011, 07:12 AM

Search Tags


/mathhelpforum @mathhelpforum