Calculation of propagating modes in a graded-index optical fibre