From e00ac8890f4c7901927d83d2058bd3070014e954 Mon Sep 17 00:00:00 2001 From: Wouter Horlings Date: Wed, 29 Nov 2017 15:11:39 +0100 Subject: [PATCH] build a function for transferfunction --- OOequipment/transferFunction.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 OOequipment/transferFunction.m diff --git a/OOequipment/transferFunction.m b/OOequipment/transferFunction.m new file mode 100644 index 0000000..8c4b491 --- /dev/null +++ b/OOequipment/transferFunction.m @@ -0,0 +1,12 @@ +function data = transferFunction(oscilloscope,functiongenerator,f_start,f_stop,n_steps) +%TRANSFERFUNCTION Summary of this function goes here +% Detailed explanation goes here + +f_array = linspace(f_start,f_stop,n_steps); +data = zeros(n_steps,1); +for i = 1:n_steps + functiongenerator.frequency = f_array(i); + data(i) = oscilloscope.ch1.peak2peak; +end +end +