user31994: My project is based on controlling a moving fan using different hand gestures. I am using image processing toolbox from matlab to detect and identify various hand movements.I want to link my matlab codes to arduino for hardware implementation. How to link these two?

user29436: This block of code can give you some idea...
% 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);

    pause(0.5);

    writeDigitalPin(a, 'D11', 0);

    pause(0.5);

end

% end communication with arduino

clear a

For more details on this code and working of it you can visit....
Here

31994: <p>My project is based on controlling a moving fan using different hand gestures. I am using image processing toolbox from matlab to detect and identify various hand movements.I want to link my matlab codes to arduino for hardware implementation. How to link these two?</p>
 29436: <p>This block of code can give you some idea...</p>

<pre><code>% 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);

    pause(0.5);

    writeDigitalPin(a, 'D11', 0);

    pause(0.5);

end

% end communication with arduino

clear a
</code></pre>

<p>For more details on this code and working of it you can visit....
<a href="https://www.allaboutcircuits.com/projects/arduino-interface-with-matlab/" rel="nofollow noreferrer">Here</a></p>
