Hi Mohamed
One of the possible ways to accomplish this is by dividing each matrix by its norm. You may try to use different variants of the norm, such as the “frobenius” norm or the usual norm (also called "2-norm"), which is based on the largest singular value of the matrix. These should help making “norm(A(i))” have values closer to 1.
You may do this for all your input matrices (as suggested by the “polyeig” documentation) as follows:
A0 = A0 / norm(A0) % 2-norm
% or
A0 = A0 / norm(A0,'fro') % frobenius norm
As the documentation for “polyeig” states, improved accuracy may not be achievable in the general case. So, you may try different choices for the norm function and choose the one which suits you best. You can read more about different norm functions here:
