Sensitivity analysis of generalised eigenproblems and application to wave and finite element models