Control variable
| This article does not cite any references or sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (December 2007) |
- For the notion of a controlled variable, see independent variable.
The term Control Variable has different meanings, depending on the area/place in which it is used. The control variable is something that is constant and unchanged in an experiment.
In scientific experimentation, a control variable is the one that must not be changed throughout an experiment because it affects the independent variables and thus affects the outcome of the experiment. For example, in the experimental verification of Boyle's law, the temperature must be kept constant. Essentially, a controlled variable is what is kept the same throughout the experiment. An example of a controlled variable would be if you have experimented on plants and tested a product on two plants, the soil and the pot would be two controlled variables.
A control variable is any factor that remains unchanged and strongly influences values;also a factor held constant to test the relative impact of an independent variable.
==
[edit] Computer Programming
In computer programming, a control variable is a program variable that is used to regulate the flow of control of the program.
[edit] Examples
- a loop control variable is used to regulate the number of times the body of a program loop is executed; it is incremented (or decremented when counting down) each time the loop body is executed.
- a single control variable can identify the present state of a computer program