Matlab code: clean up if() constructs

Merged Rolf Eike Beer requested to merge DerDakon/cmake:matlab-if into master

Merge request reports