yp = [a*y(1)-b*y(1)*y(2);-c*y(2)+d*y(1)*y(2)];
That line assumes a, y, b, c,and d are defined.
The variables a, b, c, and d are defined in your function but y is not. You've defined a variable 'y0'; perhaps you meant to use the variable y instead.
When you call your function with less than 2 inputs (or with no inputs), you receive the error because y is not defined.
Also note that defining input variables within a function is pointless unless you're just still developing the function and want to quickly test it. Otherwise, remove the variable definitions that are input variables or place those definitions within conditions that test for missing inputs.