Send values in a variable from Matlab to arduino using serial communications

Dear all, may I know how to send a values (numbers) in a variables from MATLAB to ARDUINO.
Below is my coding but error arise.
%Compute Standard Deviation of x and send it to serial
sdA = std(x)
s = serial('COM6');
s.Baudrate = 9600;
s.Terminator = 'CR';
%open serial port
fopen(s);
%send value '100' else send 101
fprintf(s,'sdA');
fscanf(s);
fclose(s);

Answers (0)

Categories

Find more on MATLAB Support Package for Arduino Hardware in Help Center and File Exchange

Asked:

on 17 Apr 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!