← All exercises

Median 3

medium

Outputs the middle of three transmitter readings, excluding the highest and lowest values.

What it teaches

Select the middle of three transmitter readings instead of averaging them. The highest and lowest values are excluded, so one extreme reading cannot pull the result away from the remaining pair. This is called mid-value selection. It does not identify a failed transmitter or reject a faulty value that lies between the other two.

Inputs and outputs

TagTypeDefaultDescription
In_AREALReading from the first transmitter
In_BREALReading from the second transmitter
In_CREALReading from the third transmitter
Out_MedianREALMiddle value of the three readings

Required behavior