check inside cell condition
1 次查看(过去 30 天)
显示 更早的评论
AppleDECB =
2×1 cell array
{'/Users/venkat/Desktop/ extract/Validation/V3 70/CURVES_initial'}
- The AppleDECB cell made to receive directory if the directory has any files inside.
- suppose no files, AppleDECB ={0};
- Now I have to make condition if AppleDECB 0 no process, else I have to use the directory path to process.
- How can i make if else condition or another way?
0 个评论
采纳的回答
Shubham Gupta
2019-8-8
Try this:
for i = 1:length(AppleDECB)
if ~ischar(AppleDECB{i}) % check if cell doesn't contain char
continue; % continue for loop without any process
end
% Write your process here
end
I hope it helps !
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!