Selecting rows based on two criteria
Show older comments
I need to work out how effective a pump is at removing 4 contaminants (Values A:D).
However, I have two pumps and need to work out how effective they are at different speeds and in isolation. I have four settings:
- 0 = pump off (at switch)
- 0.5 = pump off (below necessary conc for activation)
- 0.75 = pump on (half speed)
- 1 = pump on (full speed)
I need to know how each of the two pumps operate at removing the 4 contaminants for the following scenarios:
- Pump is 0.75 AND other pump is 0.5
- Pump is 1 AND other pump is 0
- Pump is 1 OR 0.75 AND other pump is 0.5 OR 0
There are a few more possibilites, but there is not need to list them all.
How do I select an entire row of variables is multiple AND, OR demands are met in this way?
I have included some example data below and attached a .mat file but the actual data set splits time up per second and is far larger.
Value A Value B Value C Value D Pump 1 Pump 2
16/10/2019 12:00 1 4 5 6 1 0.5
16/10/2019 18:00 4 5 6 14 0.75 0.5
17/10/2019 00:00 1 4 5 3 1 0.5
17/10/2019 06:00 4 2 3 5 0.75 0
17/10/2019 12:00 1 5 2 6 0 0.75
17/10/2019 18:00 4 3 4 6 0.5 1
18/10/2019 00:00 3 2 3 3 0.5 1
18/10/2019 06:00 4 4 2 6 0.5 1
2 Comments
per isakson
on 7 Jan 2020
To help those, who want to try their solution before answering, upload the table (in a mat-file) or a script that creates the table.
William Garrett
on 8 Jan 2020
Accepted Answer
More Answers (0)
Categories
Find more on Time Series Objects 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!