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).
I can recommend the resample command in MATLAB. It's a combination of up- and down-sampling. To get from 12kHz to a sampling rate of 9kHz, you upsample by 3 and downsample by 4. resample just needs your signal and the two factors for up- and down-sampling.  Remember, when downsampling, to first low-pass filter out everything between 4.5 kHz and 6 kHz. Very little energy should exist above the resulting Nyquist frequency.