Anisotropy of the resistivity and trapped magnetic flux in single crystals YBa2Cu3O7−x