A train crew member seriously injured while protecting passengers during a mass stabbing has been discharged from hospital.