Lambda Function Using For Loop In Matlab Example Code For Encapsulation