[Scilab-users] unique instruction

Antoine Monmayrant antoine.monmayrant at laas.fr
Wed May 13 04:02:43 CEST 2020


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





More information about the users mailing list