Help with first Arduino and Matlab collaboration

Hi,

I have been following a tutorial on you tube on how to get your Arduino board recognized within MatLab. First I created 2 GUI buttons "ON" and "OFF" in order to switch pin 13's LED on and off. When I try and compile/run the .m file called "buttons" I keep getting all these errors:

Undefined function 'arduino' for input arguments of type 'char'.

Error in buttons>buttons_OpeningFcn (line 66)
a = arduino('COM3');

Error in gui_mainfcn (line 221)
    feval(gui_State.gui_OpeningFcn, gui_hFigure, [],
    guidata(gui_hFigure), varargin{:});

Error in buttons (line 42)
    gui_mainfcn(gui_State, varargin{:});

I am working with an Arduino UNO R3, Windows 7 and MatLab 2012a. I have tried putting everything within the MATLAB path within "documents" but still the same errors. I also looked under ports and seen that my UNO is on "COM3". But it says the function "arduino" is undefined.

The link for the video is here:

Any help would be much appreciated.

please post the whole code, only an error message is so difficult for us...

robtillaart:
please post the whole code, only an error message is so difficult for us...

Thanks for the reply. It turned out that my ArduinoIO folder within my MATLAB folder was not on my MatLab path. I've now put the ArduinoIO folder on my path and moved my "buttons.fig" and "buttons.m" files within the folder and its working fine. And its working fine in the command window.