Java If Condition In Matlab Which Function