direction- 'up' for upcast, 'down' for downcast, default is 'up'
The function removes either downcasts or upcasts in the RSK structure.
rsk = RSKremovecasts(rsk,'direction','up')
When there are only downcasts in current RSK structure, request to remove downcasts will not take effect. The same for upcasts.