Melatonin, a hormone involved in regulating multiple bodily functions, is a potential therapeutic target in several conditions. Fast-scan cyclic voltammetry (FSCV) measures electroactive substances in discrete body locations in real-time with high temporal resolution. However, in long term experiments a fouling substance develops and generates an oxidation peak in the voltammograms, making it difficult to infer pure melatonin current for analysis. We report a method for constructing melatonin and by-product matrices to circumvent this problem. Sweeps prior to fouling peak development provide a pure melatonin waveform. For each of five calibrations of increasing melatonin aliquots, this waveform was scaled to map it onto sweeps during stable melatonin concentration. The scaled waveform for melatonin (the melatonin matrix) was subtracted from the composite waveform to isolate the signal of the fouling substance (by-product matrix). The isolated melatonin and by-product matrices were applied to principal components regression analysis of in vitro experiments. We examined the quantification of melatonin and distinction from noradrenaline (NA), N-acetyl serotonin (NAS), 5-hydroxyindole-3-acetic acid (5-HIAA) and serotonin (5-HT). Results confirmed excellent interpretation of melatonin concentration changes over a six-minute period, better selectivity for melatonin, and more accurate measurement of the known concentration, compared with using the original composite voltammograms.