Matlab assignment, please help!

"Write a function that calculates the determinant.Demands: The function has to check if its a quadratic matrix.the function should be able to solve different matrices, not just 3x3 but also for examaple 10x10 and it has to be solved recursively"

Im well aware Matlab has a function called det but we need to make our own!