Lambda Function Using For Loop In Matlab With An Array