How can I communicate from Arduino to MATLAB
MATLAB Support Package for Arduino (aka ArduinoIO Package) allows you to do it fairly easily.


  Sample usage:
  
  %-- connect to the board 
  
  a = arduino('COM9')
  
  %-- specify pin mode 
  
  a.pinMode(4,'input');
  
  a.pinMode(13,'output');
  
  %-- digital i/o 
  
  a.digitalRead(4) % read pin 4
  
  a.digitalWrite(13,0) % write 0 to pin 13
  
  %-- analog i/o 
  
  a.analogRead(5) % read analog pin 5
  
  a.analogWrite(9, 155) % write 155 to analog pin 9