We have studied experimentally the edge channels in an externally controlled inhomogeneous two-dimensional electron gas (2DEG) under quantum Hall conditions. The 2DEG is inhomogeneous in the sense that the electron concentration changes linearly across the width of the sample. In an impurity-free (or ideal) electron gas, these edge channels are wide compressible strips alternated with incompressible strips. However, when the presence of charged impurities (or disorder) is considered, localized compressible strips appear on both sides of the incompressible strips. We show that the width of the incompressible plus the localized compressible strips can be determined from resistance measurements. We further demonstrate that the macroscopically wide compressible strips in an inhomogeneous, disordered 2DEG act as if they are edge channels; they can be reflected at an interior potential and the values of the quantized resistances can be determined from the Landauer-Büttiker model.