Operation of a patient's heart or lungs may be analyzed by transmitting ultrasound energy into the patient's lung, and detecting Doppler shifts of reflected ultrasound induced by moving borders between blood vessels in the lung and air filled alveoli that surround the blood vessels. Movement of the border is caused by pressure waves in the blood vessels that result in changes in diameter of those blood vessels. The detected Doppler shifts are processed with an algorithm designed to increase signal from the moving border with respect to other reflected ultrasound signals and the results are then displayed.