For meeting with diversity and speed ability of development of real-time simulation system, a method for developing simulation system based on Matlab/RTW is given. The simulation models are converted to transplantable embedded C++ codes by RTW, which can shorten the development time and reduce the development costs by combining Matlab with Visual C++. This method has been applied successfully in power system simulator of some warship. The perfect models of system can be made and development speed of real-time simulation system can be fastened. Compared with the traditional method of writing simulation model codes by hand, this method can shorten the development time and make the simulator more practical.