Create detect_damage.m