described herein is a method of developing a fuzzy logic system to detect a non - normal health condition . in particular , signal processing and transformation of electrocardiogram signals for sleep disorder breathing are provided . the method includes : recording ekg measurements during sleep ; clipping the measurements into clips of a consistent length ; calculating heart rate and obtaining an evenly sampled discrete time series data clip ; performing short - time discrete fourier transform on each data clip generating stdft respective matrices ; encoding each stdft matrix into a grey - level image ; calculating grey - level co - occurrence matrices ; extracting textural features ; performing statistical analysis on the features to formulate rules ; and employing the rules in a fuzzy logic system . the system and method described herein yields an accuracy of 75 . 88 %, or better , in detection of sleep apnea .