A method is provided for detecting a change in posture of a subject. An
electrical impedance is measured between two or more sites on a stomach
(20) of the subject, and an impedance signal is generated responsive
thereto. The change in posture is detected by performing a posture
analysis of the impedance signal. A method is also provided for treating
a subject. The method includes applying an electrical signal to a site of
the subject selected from the list consisting of: a colon (402) of the
subject, and a distal small intestine (408) of the subject. The signal is
configured to stimulate cells of the subject to increase secretion of
glucagon-like-peptide-1 (GLP-1) or PYY, or to decrease secretion of
ghrelin, in order to treat the subject.