Use unique on a cell array containing two columns
3 次查看(过去 30 天)
显示 更早的评论
Hello,
I keep on getting this error when applying the unique function to my data. The data consits of a cell array with two column which are different compination of brainregion.
This is the error I get:
Unable to group rows using unique values of the table variable 'BRAINREGION' because it is a cell array with more than one column.
My code:
GroupingVariables3 = {'BRAINREGION'};
[DataTable3,~,ix3] = unique(DataTable(:,GroupingVariables3),'rows');
I hope someone can help :)
1 个评论
the cyclist
2019-10-7
It would be much easier to help if you uploaded your data (or a small subset that exhibits the error) in a *.mat file.
回答(1 个)
Prabhan Purwar
2019-11-19
Hello,
Kindly provide a small subset of data to replicate your problem.
The following link may be helpful:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Cell Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!