MATLAB: Removing weekends from table

weekend rows

Hi guys, i have a table with 6 columns and 4 million rows. Column1 shows the date and column 2 the time. Column 3,4,5,6 display the corresponding values. I want to remove all the rows that are weekends from that table.

Best Answer

Look at this example
a={'11-10-2014','12-10-2014','13-10-2014','14-10-2014','15-10-2014','16-10-2014','17-10-2014'}'
b=datenum(a,'dd-mm-yyyy')
c=weekday(b)
out=a(c~=7)