Re: [Scilab-users] unique instruction

2020-05-12 Thread Antoine Monmayrant

Hello Paul,

You want to keep "unique" values along the first column of M.
Here is how you can get this result:

//

M = [ 0 2; 0 6; 1 8;2 9]
firstCol=M(:,1);
[dum,ind]=unique(firstCol);
MuniqueFirstCol=M(ind,:);

//


Hope it helps,


Antoine


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] unique instruction

2020-05-12 Thread Carrico, Paul
Dear All
In the matrix here after, I want to remove duplicate values in the first column 
but while keeping the second one as it stands ; I guess Scilab while keep the 
first occurrence but it's fine.
I do not remember how to use correctly  "unique" and all my trials failed: can 
somebody help me?
Thanks
Paul

Before :

M = [

0 2

0 6

1 8

2 9

]
After :

M = [

0 2

1 8

2 9

]

 Or

M = [

0 6

1 8

2 9

]


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users