Ok, do you understand that you CANNOT compute the roots of a polynomial, if the degree of that polynomial is greater than 4? Well, at least, unless the roots are trivial. For example, yes, this works.
solve(x^6 - 1 == 0)
ans =
But in general, if the polynomial is non-trivial, then there is no general solution, and this is provably true? (Talk to some folks named Abel and Ruffini if that upsets you. They are both long dead of course, so you may need a Ouija board, or something as useful.)
Next, you need to understand that computing the eigenvalues of a matrix is mathematically equivalent to solving for the roots of a polynomial. So a 5x5 or 6x6 matrix has a chacteristic polynomial, and the roots of that polynomial are the same as the eigenvalues of the matrix. There is a complete correspondence between the two problems. If you can solve one, you can solve the other. But I just got done telling you that you CANNOT compute the roots of a general symbolic polynomial of degree 5 or higher, where the result has an algebraic solution. For degree 4 or below, the problem is solved, and the solutions have also existed for many years. That means, effectively, the eigenvalues of even a fully general 4x4 matrix can be found in algebraic form. They will be a little messy, but they are still trivially written in theory. For 5x5 or above, nothing can be done. NOTHING.
Do you see where this is going? Just wanting to solve a problem that is mathematically impossible to solve, where it has been proved to be the case. Well, the need or the desire is not sufficient. Sorry. This is not a question of MATLAB. It is a question of mathematical impossibility.
whos
Name Size Bytes Class Attributes
A 6x6 8 sym
A_evs 6x1 8 sym
ans 6x1 8 sym
cmdout 1x33 66 char
gdsCacheDir 1x14 28 char
gdsCacheFlag 1x1 8 double
i 0x0 0 double
managers 1x0 0 cell
managersMap 0x1 8 containers.Map
x 1x1 8 sym
It appears your matrix is A. That is a good name.
And now you want to compute the eigenvalues of A, in an algebraic form, as a function of y AND of z. Sorry. Not gonna happen. EVER. Again, if you have a problem, all you can do is talk to either Abel of Ruffini. Maybe you can convince them that you really, very much need a solution, and that you need them to rewrite the proof. This may take a truly cosmic intervention though. Do you have the right connections for such a task? I certainly don't.
If you knew the values of both y and z. Well, then you can compute the numerical roots.
vpa(eig(subs(A,[y,z],[3,17])))
ans =
But you need to see at that point, the result is just a numerical matrix. Now a rootfinder has no problem handling what is essentially a polynomial rootfinding problem.
In terms of your original matrix A though, there is NO numerical solution that can be applied. There is no magic. You really cannot do more than that. I'm sorry. Mathematics can be a cruel mistress at times.