MATLAB: Removing saturday and sunday and the corresponding values from a table.

table values

hi guys, I have a table which is in table format in matlab. the table has 5 million rows and 6 columns. here is a sample of the very first line:
'26.07.2004' '2:00' 0.637900000000000 0.638000000000000 0.637600000000000 0.637800000000000
Now this is not a cell array but a table and I want all the dates and their corresponding values in the rows to be removed that are Saturday or Sunday. Can anyone suggest something?
thank

Best Answer

Look at this example
a={'25.10.2014' '2:00' 0.6379 0.6380 0.6376 0.6378
'26.10.2014' '2:00' 0.6379 0.6380 0.6376 0.6378
'27.10.2014' '2:00' 0.6379 0.6380 0.6376 0.6378}
b=cell2table(a)
idx=ismember(weekday(datenum(b.a1,'dd.mm.yyyy')),[2:6])
out=b(idx,:)