Range Matlab Function Syntax Python If Function With Boolean