The error message refers to the fast that ga requires the objective function to return a scalar, as the help clearly states "The fitness function should accept a row vector of length nvars and return a scalar value.". Instead of returning a scalar value your objective function returns a vector f which has length(pvy) elements:
Your code has other bugs, such as that the filenames differ from the function names. The objective function calls xlsread multiple times: this is going to be very inefficient because the objective function gets called many times and reading from file is slow. You would be much better off parameterizing your function using either an anonymous function or nested functions:
Plotting inside the objective function will also waste a lot of time: it would be better to wait until after the GA algorithm has returned a result, or if you want to follow the results as the ga algorithm progresses then use one of the inbuilt ga plotting functions:
You have a lot of code and its purpose is not clear so I would not hazard any guesses how to fix it. I recommend that you should start small before jumping into such a complex task as this one (with file reading, etc.): copy one of the examples from the help and make sure that it works for you. Understand how it works, before starting to make small changes to incrementally turn it into the solver that you require. Your current approach of writing lots of code without testing it nor knowing what it is doing is a total waste of your time.