Checking Function In Matlab Code