Measure and cut two of your two-by-four boards to be the top and bottom plates for the knee wall.
Snap a chalk line onto the floor where you're installing the knee wall.
Lay the bottom plate onto the floor along the chalk line but don't nail it to the floor.
Create a template for the studs by standing a two-by-four on edge on top of the bottom plate. Trace the edge of the roof rafter onto the board. Cut the board along the line you traced.
Mark the cut line on the wall studs using the template as a guide, and cut the studs with a circular saw. Use enough studs so that they're spaced no more than 16 inches apart.
Nail a stud to each end of the bottom plate. Place the uncut edge of the studs against the bottom plate when nailing them.
Nail the uncut edges of the other studs to the bottom plate between the two end studs. Keep the studs spaced no more than 16 inches apart.
Nail the top plate to the angled edge of the wall studs.
Move the assembled frame into position. Nail the top plate to the roof rafters and the bottom plate to the floor joists. Use a stud finder to locate the floor joists if you're not sure of their location.