MATLAB Support Package for Velleman PCSGU250 Oscilloscope + Function Generator
by
MathWorks Classroom Resources Team
25 Jul 2011
(Updated
04 Aug 2011)
MATLAB library for controlling a Velleman PCSGU250 scope and generator

makeSampleLibs.m 
% makeSampleLibs
%
% Creates two simple arbitrary waveform library files. The first is a
% sinosoidal AM signal. The signal frequency is equal to the PCSGU250's
% frequency setting; the carrier frequency is 20 times that. The second
% function is a sine wave with Gaussian noise added to simulate a noisy
% communication channel. The frequncy of this signal will be equal to the
% PCSGU250's frequency setting.
%
% Calling this script will calculate each waveform, plot it, and create the
% library file. Press any key to move on to the next waveform.
%
% The two lib files will be called 'AMWave' and 'Noisy Sine', respectively.
% Use pclab.FgenLibFile to set the lib file using these names exactly.
% MATLAB Support Package for Velleman PCSGU250
% Version 1.0
% Copyright 2011 The MathWorks, Inc.
i = linspace(0, 2*pi, 4000);
a = sin(i);
b = sin(20*i);
c = a.*b;
plot(c)
vellscope.makeLibFile(c,'AMWave');
waitforbuttonpress;
d = .1*randn(size(i));
e = a + d;
plot(e);
vellscope.makeLibFile(e,'Noisy Sine');


Contact us