Multimode fibers are a promising tool for high resolution, low-cost, minimally invasive endoscopic imaging. The fiber can be used both to illuminate the sample, which may be buried deep inside the tissue, and to collect the backreflected light. Except for the bare fiber, no other imaging optics have to be inserted, enabling a device with a very small diameter. However, light propagating through the fiber is scrambled before it hits the sample. This renders straightforward imaging impossible, but if this scrambling is known with high accuracy, for instance because the transmission matrix has been measured, the scrambling process can be compensated before the light enters the fiber. For step index multimode fibers, where the refractive index profile consists of a cylindrical core with a constant but higher refractive index than the cladding, it has been shown that the transmission matrix can be predicted for any fiber orientation. Graded index fibers (GIF), where the refractive index profile resembles a parabola, offer numerous advantages, most prominently they are much less sensitive to bending. We measured the transmission matrix of a large GIF and show that we can fully understand the transmission matrix in terms of guided fiber modes, and simultaneously acquire accurate knowledge of the refractive index profile. We also show that although the quality of a commercially available graded index fiber is not sufficient to perform the same analysis, imaging performance of a graded index fiber is much more resilient to bending than the imaging performance of a comparable step index fiber. This demonstrates the need for a graded-index fiber with a high quality refractive index profile.