Java Program For If Else Statements Matlab Plot