MATLAB: Deleting columns that contains 0,1 and negative numbers

matlab function

I have a large file, i want to delete the colums that contain 0,1 or negative values. I am new in matlab, any help will be appreciated. thank you. Until now. i tried to write the following lines to execute the file but it is not working
f1=readtable('test1.csv'); %Read file 1
d1=table2array(f1);
d1(:,1)=[] % removing the first column as it is empty
d1(d1(:,1)<0,:)=[] % removing the columns that are less than 0

Best Answer

d1 = readmatrix('test1.csv');
d1 = d1(:,2:end); %removing the first column as it is empty
mask = all(d1 <= 0 || d1 == 1,1);
d1(:,mask) = []; %remove columns that contain only 0, 1, or negative values