This paper presents a 200-line MATLAB code for the easy and compact analysis of various multi-speed EVs. Based on mathematical analysis methods for EVs, MATLAB code was implemented to evaluate EV efficiency and performance. The code consisted of four parts: i) data input, ii) efficiency analysis, iii) performance analysis, and iv) gear-shifting logic. The efficiency and performance analyses were intended to calculate the energy consumption under a target driving cycle, and the acceleration ability and maximum speed under the maximum acceleration condition, respectively.

