Study of the resistive switching phenomenon in YBCO superconducting samples