How to impose max/min limits on anonymous functions i.e. I have to ensure that the current cell does not go beyond this matrix pTransition i.e. bounds are [-2,-2] and [2,2]
Thanks
pTransition = [ 0 0 0 0 0 0 .05 .1 .05 0 0 .1 .4 .1 0 0 .05 .1 .05 0 0 0 0 0 0 ];getPLocalTransition = @(localCoordinate) ... pTransition(localCoordinate(1) + 3, localCoordinate(2) + 3);% above are the given conditions
%trying to implement the foll function:
calcPTransition = @(x_t, u_t, x_tm1)...pTransition(x_t(1) + 3, x_t(2) + 3);
Best Answer