Modified read_sm4.m