The reason you get the vector 1 0 0 is that datestr(733546,8) is the string
"Sun" and you are comparing it to the string "Sat". String comparison then
treats the comparison as a vector with each element of the vector 1 if the
letters in that position are identical, or 0 if they are different.
There is no need to use datestr, because you admitted you already have the
date number, in your example you gave 733546.
So if you use d = 733546 then Marco Atzeri's solution is the correct one
which using d as your date variable, in a compact way would become
d = 733546;
a = localtime(d);
b = eomday(a.year+1900,a.mon+1);
Last_Saturday = (a.wday == 6) & (a.mon+7>b)