Hi,
You can try specifying board and type as below
a = arduino('COM4','Uno');
Make sure you specify correct board type and and board type is supported. List of supported Ardino types can be found here
For more information regarding connection failures refer these links