Research Article
A Feasibility Study on Smart Mattresses to Improve Sleep Quality
Algorithm 1
Height recognition pseudocode.
| | Input: pm18 10 pressure matrix, pressure threshold δ | | Output: h user’s height | | rowlist = [] | | For row in pm | | For column in pm | | If pm [row, column] > | | add row number into rowlist | | end if | | end for | | end for | | h = (max(rowlist)-min(rowlist)) 10 |
|