Is there Matlab code that shows a series of numbers representing a waveform as a spectrogram?
The time interval each sample represents is the same, idearly this could also be given to use for the axis scale.

For example:
spec({1 2 3 2 1 2 3 2}, 0.1 seconds)
or
spec(my_data.txt, 10 Hz)
etc...