![]() |
CropPURPOSE
Forces a state to be in a given discrete space.
SYNOPSIS
function sOut=Crop(DS,s)
DESCRIPTION
Forces a state to be in a given discrete space. Ensures 's' to be an integer in between 1 and the number of dimensionality of the given discrete space. CROSS-REFERENCE INFORMATION
This function calls:
This function is called by:
SOURCE CODE
0001 function sOut=Crop(DS,s) 0002 % Forces a state to be in a given discrete space. 0003 % 0004 % Ensures 's' to be an integer in between 1 and the number of 0005 % dimensionality of the given discrete space. 0006 0007 sOut=floor(min(max(s,1),DS.max)); 0008 |