Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Data comparison and storing
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I've created a sensor to take readings daily .
Humidity =
20×1 string array
"34.099045"
"42.425098"
"33.480418"
"35.790796"
"30.370059"
"44.029928"
"49.041827"
"44.980187"
"45.134548"
"40.841782"
<missing>
<missing>
<missing>
<missing>
<missing>
<missing>
<missing>
<missing>
<missing>
<missing>
HumidityTime =
2 24
4 48
7 12
9 36
12 0
14 24
16 48
19 12
21 36
24 0
5 Kommentare
Peng Li
am 29 Mär. 2020
Again you have 20 rows in humidity data but 10 rows in humidity time. How do they match? If they match by rows, you can use HumidityTime(double(humidity) > 40 & double(humidity) < 50, :) to get the times that humidity meet your defined criterion.
Antworten (1)
Mohammad Sami
am 30 Mär. 2020
Humidity = str2double(Humidity(~ismissing(Humiditiy)));
lowlimit = 40;
highlimit = 50;
outsidelimit = Humidity > highlimit || Humidity < lowlimit;
alerts = [HumidityTime(outsidelimit,:) Humidity(outsidelimit)];
2 Kommentare
Walter Roberson
am 20 Apr. 2020
At the time you get that output, what is the string array that you are starting with ?
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!