# Can a mathematical function be assigned to ECG diagram? [closed]

This is a 12 lead electeocardiogram of a 26 year old male:

This is the graph of function $5sin(7x)sin(.5x)cos(3.25x)$ This graph look quite similar to the ECG diagram.After sketching this graph, I thought whether ECG diagram could be assigned roughly to a mathematical function.

Question: Has anyone ever tried to even roughly assign the diagram to a mathematical function? Is it even possible?

• "Has anyone ever tried to even roughly assign the diagram to a mathematical function?" Yes, it was done before, using Fourier series (kind of what you have in your graph). The result is far from beautiful, see here: intmath.com/fourier-series/ecg-fourier-quartic-plusT.pdf. And here a detailed explanation: intmath.com/blog/mathematics/math-of-ecgs-fourier-series-4281
– user24284
Sep 15, 2017 at 8:42
• The links are broken or I can't open them from my android Sep 15, 2017 at 11:42
• Fourier series was my first guess, too. Is there any particular reason you would like to do that? I'm asking because if fitting is your concern, wavelet decomposition may be easier to work with. By the way, the links work for me. Sep 15, 2017 at 12:09
• @Mockingbird the links are up.
– user24284
Sep 15, 2017 at 12:34
• Yes, this would require Fourier series, in which case you would then desire to establish the number of terms needed to best fit your data, and, at the same time, find the value for each term's coefficient. If you have the raw data, you can upload to it Wolfram alpha and it will generate a function that fits. For example, WA can generate a function for Obama's signature; #26 on the list.
– user22020
Sep 15, 2017 at 12:40

Yes a function could be assigned to an ECG diagram. I don't know if that would be helpful in any kind of research. Anyway I believe that from a mathematical point of view that if you manage to include all the equations shown in the picture into a single one you should get what you are looking for.

I have not made the diagram it was taken from this paper https://www.researchgate.net/publication/286584223_Design_of_a_synthetic_ECG_signal_based_on_the_Fourier_series by Radana Kahankova.

• I was a high school back then when I asked this question. Obviously I had no emphasis on the graphical analysis being useful. haha Apr 27, 2023 at 14:22

Try this:

$$f(x)=-20(e^{\left(\operatorname{mod}\left(x-10,\ 20\right)-10\right)}*(e^{5\left(\operatorname{mod}\left(x-10,\ 20\right)-10\right)}-57*e^{4\left(\operatorname{mod}\left(x-10,\ 20\right)-10\right)}+302*e^{3\left(\operatorname{mod}\left(x-10,\ 20\right)-10\right)}-302*e^{2\left(\operatorname{mod}\left(x-10,\ 20\right)-10\right)}+57*e^{\left(\operatorname{mod}\left(x-10,\ 20\right)-10\right)}-1))/(e^{\left(\operatorname{mod}\left(x-10,\ 20\right)-10\right)}+1)^7$$

• Er, how does anyone know whether this is right or not? Dec 28, 2018 at 15:42
• Just copy the tex and paste it here: desmos.com/calculator