Powershell While Loop Multiple Conditions If Function In Matlab