To setup the lab instruments for systematic measurements using matlab, use the IN3170 instructions and script.
I have made links at the bottom of our "Lab Page"
If you prefer python you can alternatively use these scripts
https://github.com/paalgh/IN5180_LabSetup
however, getting trace-data from the oscilloscope is not yet implemented in python