The error means you are trying to access an element in Q that does not exist. From the message, Q contains 8 elements, so you get an error when trying to indext a 9th element.
This makes sense. You define Q as having 8 elements.
Q = [beta alpha lambda vac d gamma c m];
but in your function, you try to access a 9th element
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.