# Reducing sampling rate by a non-integer factor

I have data that is sampled at 12 kHz. The downsample function in software such as MATLAB only allow you to downsample by an integer factor, i.e. from $12\to{6,4,3,2,1,\ldots}$ kHz. How would I downsample by a non-integer factor, say, from $12\to{10,9,8,7,5,...}$ kHz (pseudocode/description is fine)? You can assume that the signal has been appropriately lowpass filtered prior to downsampling. Also, the desired new sampling rate (after downsampling) is a "nice" number (i.e., I'm not trying to do $12 \to 9.7432$ or something like that).