How to delete repeated elements in column
显示 更早的评论
I have 10x4 array with strings say
D={'Run' '' 'play' '';
'' 'go' '' 'sit' ;
'Run' '' 'play' '';
'' 'go' '' 'sit';
'' 'down' '' 'play';
'' 'go' '' 'sit'}
I want to remove consecutive elements in each column such that i get result as
res={'Run' '' 'play' '';
'' 'go' '' 'sit' ;
'' '' '' '';
'' '' '' '';
'' 'down' '' 'play';
'' 'go' '' 'sit'}
I tried using for loop and deleting ,the thing is that all elements with same names get deleted.
Kindly help
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Just for fun 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!