Clear Filters
Clear Filters

Signal reconstruction : Fit or merge one signal into another based on range and enclosing boundaries for signal

3 views (last 30 days)
I have to 2 time series array:
Inserting signal = [20, 10];
receiving signal = [ 40, 20, 40, 10, 40];
I want to fit or merge inserting signal into receiving signal based on below criteria. :
Range on inserting signal i.e (20-10 = 10) should be less than receving signal (1. 40-20 =20) (2. 40-10 = 30) (3. 10-40 = -30).
There are 3 instance where we can fit or merge inserting signal into receiving signal.
But in 1 instance [20,10] is outside the boundary of [40,20]. (failed case)
I want some logic or code to find that instance 2 [40,10] or 3 [10,40] and insert signal at that location.
Final output expected = [40 20 40 10 20 10 40];
Please refer attached image for better clarity.
Please support.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!