ext: use the same funtion name as matlab