Two Array merging into one based on range
5 views (last 30 days)
Show older comments
Hello team,
I have to 2 time series array:
Signal_1= [20, 10];
Signal_2 = [ 40, 20, 40, 10, 40];
I want to merge or insert Signal_1 into Signal_2 based range and Signal_1 completely enclosed between Signal_2.
Range_1 = peak2peak(Signal_1); % 10
Range_2 = peak2peak(Signal_2); % [20 20 30 30]; Although this will 30 alone but in array i mentioned range for each 2 values
Based on range, Range_1<Range_2, it can be merged into any of these values.
But [20 10] lies outside [40 20 40] range. While it enclosed between [40 10 40].
Please help in writing code for this this.
Final expected result = [40 20 40 10 20 10 40]
0 Comments
Answers (0)
See Also
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!