Since both matrices A and B are singular, it is not an easy problem numerically. Even eig(full(A), full(B)) may give you wrong answers. EIGS in the call eigs(A, B, k, guess) is not probably going to work, since it relies on computing the inverse of the matrix A - guess B, which is singular in your case.
If the kernel of B is a subset of the kernel of A, and the difference in dimensions is not too large, you may want to try https://www.mathworks.com/matlabcentral/fileexchange/48-lobpcg-m with the constraint blockVectorY being the set of vectors spanning the known kernel of B. LOBPCG gives you k smallest, no matter zeros, or not, however, so you may need to choose k large enough to get to where you need. The value of k in LOBPCG is the number of the linearly independent initial approximate eigenvectors. If k is too large, relative to the matrix size, it will not work well...
Best Answer