How do you remove specific rows from a cell array?
显示 更早的评论
I have this 70x1 cell that is made up of my files and looks like this:
{'myPC\Documents\MATLAB\DataAnalysis\temp\6\Temp-20\TS1.csv' }
{'myPC\Documents\MATLAB\DataAnalysis\temp\6\Temp-20\TS1.csv' }
{'myPC\Documents\MATLAB\DataAnalysis\temp\6\Temp-20\TS6.csv' }
{'myPC\Documents\MATLAB\DataAnalysis\temp\6\Temp0\Print.csv' }
{'myPC\Documents\MATLAB\DataAnalysis\temp\6\Temp0\TS12.csv' }
{'myPC\Documents\MATLAB\DataAnalysis\temp\6\TS15.csv' }
.
.
.
.
The thing is I want to remove each row that has TS1 in their name, any help? Thanks
采纳的回答
更多回答(1 个)
KALYAN ACHARJYA
2019-6-21
编辑:KALYAN ACHARJYA
2019-6-21
How do you remove specific rows from a cell array?
data=num2cell(rand(70,1)); % Considering random cell array
%delete suppose 4 row
data(4,:)=[];
Check sizes
Name Size Bytes Class Attributes
data 70x1 8400 cell
Name Size Bytes Class Attributes
data 69x1 8280 cell
类别
在 帮助中心 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!