I assume you've saved this in a file named QuadraticEquation.m. If so you just need to rename the file to quadratic.m and ideally change the name of the function inside the new quadratic.m to quadratic instead of QuadraticEquation. Best practice is for the name of the file and the name of the main function in that file to match; if they don't, you will need to call the function using the name of the file.
But you have another problem: the variables you've defined (or not defined) in your function. Nowhere in your code do you define the variables x1 and x2 that the function declaration line states should be returned from the function. You also define a variable named root but you never use the values you assign to it. In your else statement you also assign to the second and third elements of root, which will automatically make the first element equal to 0.
Another portion of your code that I'm not sure will satisfy your assignment, are you sure that your assignment wants you to return the text 'No Real Root' in the case where there are no real roots? I'd probably return an empty array (either zeros(1, 0) or [] depending on if the caller requires the output to be a vector or not) for that case.