Two Array merging into one based on range
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!