and welcome to SE.SP!
You need to learn the difference between analog and digital signals. You can google this of course.
In a nutshell, an analog signal is a continuous signal representing some other quantity, i.e., analogous to another quantity (source: wikipedia). You could coarsely say that analog signals only exist in the physical world. Sound, light, voltage, temperature: these are signals that are continuous in time.
When we want to analyze an analog signal with digital devices such as computers, that can only represent signals as a set of discrete (the opposite of continuous) numbers, we need to sample this signal through the use of an ADC (Analog to Digital Converter), the result being a sequence of samples that the computer can store.
What you're asking is therefore impossible. Once the signal is in computer memory, it's already sampled. It's not continuous anymore, it's digital.
As such, in your case, the 5KHz signal you mention is either already sampled at some sampling frequency defined by whatever ADC was used to convert the analog representation of its physical quantity into a digital representation through sampling, or it has been generated by software (see @Tim Wescott's comment on your OP).
What you might be trying to do is to resample your signal, i.e modifying the sampling rate, but I won't go further into this since you really need to understand the absolute basics first.
Let me know if you need more explanation.
EDIT: Sampling rate requirements
You need a sampling rate that's AT LEAST twice your signal's bandwidth of interest (Nyquist-Shannon theorem). So if you're interested in a 5KHz signal, 50MHz is overkill. In fact, the theory would tell you that a sampling rate of 10KHz is enough. Of course that's the theory, in practice you'd want to sample at a rate higher than that. Not sure what sampling rates your ADC supports, but 16KHz is a typical one, and in your case would do the trick.