필터 지우기
필터 지우기

check inside cell condition

조회 수: 1 (최근 30일)
Venkat Ta
Venkat Ta 2019년 8월 7일
댓글: Venkat Ta 2019년 8월 8일
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?Screen Shot 2019-08-08 at 1.32.20 AM.png

채택된 답변

Shubham Gupta
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 !
  댓글 수: 1
Venkat Ta
Venkat Ta 2019년 8월 8일
Thanks
Nice idea

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Search Path에 대해 자세히 알아보기

태그

제품


릴리스

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by