C = unique(A ) returns the same data as in A , but with no repetitions. C is in sorted order.
>> unique([1 2 4 4 3 4])
ans =
1 2 3 4
tbl is arranged as follows:
-
1st column — The unique values of x
-
2nd column — The number of instances of each value
-
3rd column — The percentage of each value
>> tabulate([1 2 4 4 3 4]) Value Count Percent 1 1 16.67% 2 1 16.67% 3 1 16.67% 4 3 50.00%
|
请发表评论