Using Arduino Target

Hi Guys,
I have to use simulink and arduino for a PIL project. I am a noob just beginning to use both packages. Please help, I need to get on with the project and sumbit in 3 days :frowning:
I downloaded the simulink support for arduino called Arduino Target. Then I followed the instructions in the readme file.

cd c:\ARDUINO_TARGET
addpath(fullfile(pwd,‘arduino’),fullfile(pwd,‘blocks’),fullfile(pwd,‘demos’))
savepath
sl_refresh_customizations
arduino.Prefs.setArduinoPath(‘c:\Program Files\arduino\arduino-0018’)

The following error appears at the last command line :

arduino.Prefs.setArduinoPath(‘C:\arduino-0022’)
??? Error: File: Prefs.m Line: 97 Column: 23
Expression or statement is incorrect–possibly unbalanced (, {, or [.

I tried to look up Prefs.m but couldn’t understand the code.
You can find Prefs.m here

The problem seems is in the following line of the package:

function ports = searchForComPort(regCmdOutput)
ports=’’;

if nargin < 1
if ispc
regCmd=['reg query '…
‘HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM’];
[~,regCmdOutput]=system(regCmd); <===========This line has problem
end
end