We propose a scheme for assigning the martensite variant using electron backscatter diffraction in a martensite material that undergoes a solid-solid phase transformation. Based on the solutions of the crystallographic equations of martensite, we provide an algorithm to assign martensite variants to a particular microscopic region, and to check the elastic compatibility of the microstructure corresponding to low hysteresis and high reversibility in shape memory alloys. This article is part of the theme issue 'Topics in mathematical design of complex materials'.
Keywords: compatibility; electron backscatter diffraction; martensite; microstructure.