how to apply if else in matlab