tôi có một mảng chứa tất cả các tệp trong một thư mục cụ thể. Tôi muốn xóa tất cả các mục nhập tệp kết thúc bằng phần mở rộng .txt. Đây là những gì tôi đã viếtxoá phần tử khỏi mảng MATLAB
function fileList = removeElements(fileArray)
for idx = 1:numel(fileArray)
if (strfind(fileArray(idx),'.txt') > 0)
display('XX');
fileArray(idx) =[];
end
end
end
nhưng tôi nhận được một lỗi
??? Undefined function or method 'gt' for input arguments of type 'cell'.
Error in ==> removeElements at 6
if(strfind(fileArray(idx),'.bmp') > 0)
có thể ai đó hãy giúp tôi