State-space modeling method for both. hard- and soft-switching PWM DC/DC converters is discussed and a MATLAB/Simulink model to implement this method is proposed in this paper. Due to direct adoption of state-space equations and compact structure established with Simulink, the proposed model shows high reliability and more effective performance and it is particularly suitable for steady-state analysis of soft-switching PWM DC/DC converters. An example of transient process simulation for a hard-switching converter and another example of steady-state simulation for a soft-switching converter are presented to verify and highlight the features of the proposed model, with emphasis upon the latter.