If you want a mathematical expression, WRITTEN in MATLAB (where it will not have been written in the actual code) this could work:
myfloor = @(x) double(int64(x));
After converting the floating point number to an integer, then it needs to be returned as a double. But that code would be better written to return a number of the same floating point class, since that would fail for single precision input. As well, for input that was already an integer class, it should not convert the result to a double. Finally, that code will fail for negative numbers, since floor(-2.3) is -3.
Negative numbers round down for floor. A simple function that will effectively work for numbers of any sign is:
mybetterfloor = @(x) x - mod(x,1);
As you can see, this code rounds down for negative numbers, as does floor itself.
all(floor(x) == mybetterfloor(x))
No explicit cast to another class was done in that code, so it should work for any floating point or integer class. Is that how they implemented it in compiled C? Surely not.