Rand Matlab Function Definition