I found a quick tutorial on how to Interface an Arduino with MATLAB.
The tutorial shows how to blink an LED from MATLAB.
Here's what the code looks like:
% create an Arduino object
a = arduino('com3', 'uno');
% start the loop to blink led for 10 seconds
for i = 1:10
writeDigitalPin(a, 'D11', 1);
writeDigitalPin(a, 'D11', 0);
% end communication with Arduino