From: Estee on
Hello, I have been given a signal with M points. I take consecutive N points in the signal, and window and FFT the N points, then put it into an output vector --> the process of STFT. The task now is to display the output vector on a plot that updates at every iteration (the plot is dynamic, and does not just show the final transformed signal). At the same time, I need to have an audio output of the original signal. So far, I can output both the plot and the audio signal, but the plot is 'growing' at the speed that MATLAB is applying the iterations, and not at the speed that the audio signal is outputting (which is controlled by the input sampling rate).

Does anyone know how I can somehow implement the sampling rate to the plot, so that the plotting speed is the same as the audio output speed?

Thanks!!