I have asignal and I would like to decompose it into two..
this is the datasetTot of both signals
ListPlot[datasetTot, PlotStyle -> {Black, Black}]
I know that this signal is a sum of two signals whose shape is like this
My question is: can I get the green and red signals separately from the original data datasetTot
?
update
the green and red signals are
green={-2 Tanh[1 - x] + Tanh[x], Tanh[x] + 2 Tanh[1 + x]}
red={3/2 (Tanh[2 x] - Tanh[2 (1 + x)]), 3/2 (Tanh[2 - 2 x] + Tanh[2 x])}
NMinimize
a least-squares expression for the black signal as a linear combination of the red and green signals (with two real parameters describing the coefficients of the red and green contributions) $\endgroup$NonlinearModelFit
to get the two coefficients (as Joshua already proposed). $\endgroup$