MOSFET as a voltage controlled resistor
Technically the MOSFET can operate as a variable resistor, but there are two main issues:
In the ohmic region (which is quite narrow, in terms of output voltage) the linearity is poor, and it also depends on input voltage. It won't be very easy to tune it to behave like a proper resistor.
MOSFETs' output resistance is usually not an accurate value, and it will be hard to get the exact value from the datasheet. What you can do is to measure it for various input and output voltages, and to create a table with the values. But if you don't need it to be accurate, you can use the graphs in the datasheet.
Another choice can be to use an integrated VCR.
Yes Sergej. You are 100% right !
A MOSFET can easily be used as a variable resistor. You have to consider few important parameters before using as a variable resistor. Main things are
The minimum resistance you need and the \$ R_{DS(on)} \$ of the MOSFET you have chosen.
The MOSFET's behavior in the linear region though it is similar for almost all the MOSFETs.
Now we will see how we can use it as a variable resistor by making use of following characteristic curves of MOSFET
When the \$ V_{GS} \$ is below \$ V_{th} \$ of the MOSFET it is in a cut-off mode that means the entire supply voltage comes appears across MOSFET.It means that now the MOSFET is acting as a open-load with infinite resistance.
When you slowly increase the gate voltage the MOSFET slowly starts conducting by entering the linear region where it starts developing voltage across it which we call as \$ V_{DS} \$ . In this region the MOSFET acts as a resistance of finite value.
Now when the MOSFET enters the saturation region the resistance of the MOSFET is the least and is equal to the \$ R_{DS(on)} \$ of the MOSFET which is mentioned in the circuit.