The low cost, ease of deployment has exposed WSNs an attractive choice for numerous applications,like environmental monitoring applications , security applications, real time tracking, and so on. But in reality, these networks are operated on battery with limitations in their computation capabilities, memory, bandwidth ,so they called networks with resource constrained nature, and this impels various challenges in its design and its performance. Limited battery capacity of sensor nodes makes energy efficiency a major and challenge problem in wireless sensor networks. Thus, the routing protocols for wireless sensor networks must be energy efficient in order to maximize the network lifetime. In this paper we simulated LEACH,SEP,DEEC,TEEN routing protocols and evaluated their performance by comparing with DT routing protocol in Homogeneous and Heterogeneous Wireless Sensor Networks on MATLAB.