Pwm motor port connection question?

can you make the pwm signal go from pulsing to flat by hooking up an average capacitor between the motor and pwm