How to filter data corresponding to a limit?
1 view (last 30 days)
Show older comments
I am trying to filter out temperatures above and below 58oF (limit), then use the filtered data for further coding (trying to evaluate heat transfer in a heat exchanger at temperatures above and below the limit)
example :
T2 = ([10 11 17 18])*9/5 + 32;
limit = (14.5*9/5)+32;
x = find(abs(T2)<limit)
y = find(abs(T2)>limit)
Q_before = m_return_air * Cp_air .* (T3 - x)
Any tips or help would be great. Thanks.
Tony
0 Comments
Accepted Answer
Star Strider
on 3 Jan 2016
The ‘x’ and ‘y’ in your code are going to be the indices of the values you want. To get the actual values, this works:
TF = @(C) 1.8.*C + 32; % °C —> °F
TC = 0:20; % Celsius Temperatures
Lim = TF(14.5);
T2 = TF(TC);
x = T2(T2>Lim);
y = T2(T2<Lim);
2 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!