What's the sampling frequency when synthetically generating data? Say I am using matlab's random number generator to get an array of random numbers, which I will then, for testing purposes, find the spectral density etc. For that purpose I need to know the sampling freq., but these have been generated synthetically so I am not sure how the sampling theorem applies here.
The sampling rate is arbitrary- you choose it.

Usually people are simulating a real situation, like, for example, audio from a CD.  Then you would choose the sample rate to be 44.1 kHz.