combine 2 vectors to one result vector
Show older comments
Dear all,
These are my arrays:
y = [94 96 96 94 89 92 90 89 88 92 93 91 91 91 90 88 90 87 90 91];
y1 = [95 93 94 92 95 93 90 91 92 92 91 87 88 90 96 95 92 91 94 93];
x = [1 2 3 5 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20];
replace = [0 0 2 -5 0 1 0 0 0 -8 -1 0 0 4 0 0 0 -1 -2 0 ];
The y is my raw data, the y1 is my filtered data, x is the x data and replace is the array with statements to replace vectors in y1.
So now I have to replace the value in y1 with the y value where the replace vector is <0. How do I do this?
Thanks!
Accepted Answer
More Answers (0)
Categories
Find more on Logical 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!