Railways as a dimension of transportation infrastructure has been widely welcomed in developed and developing industrial countries because of the ability to carry heavy loads over long distances, more safety, less depreciation, less cost, less pollution, etc. Therefore, knowledge of the dynamic behavior of the railway is essential for designers and builders. It is very important to study the vibration and affected parameters including the specifications of the car-body, bogie, primary and secondary suspension system, track condition, rail specifications, etc., to assess the ride comfort and maintenance. This paper analyzes the effect of different parameters of a rolling stock on vertical acceleration and ride comfort by modeling a rail vehicle using MATLAB/Simulink. The First quarter of bogie suspension system was performed with step input conditions based on mathematical equations, and then the displacement, speed, and acceleration performance of the system were evaluated and validated. Finally, the effects of rolling stock parameters such as mass, and primary and secondary suspension parameters on vertical vibrations and ride comfort using root-mean-square (RMS) accelerations and Sperling comfort index were evaluated. One of the results showed that changing the parameters of the secondary suspension (K1, C1) has the greatest effect on the RMS acceleration of the car-body and ride comfort. By 50% reduction in the value of K1 and C1, the value of ride comfort (Wz) decreases about 14% and increases about 9%, respectively.