PROBLEM-Sent a string from Matlab to Arduino

Hi everyone. I try to sent a string from matlab to arduino but i have no success.
the Matlab code is:

s = serial('COM3','BaudRate',9600); % Start serial port
fopen(s);                                    %open connection


 %Sent string to s

 invMsg = char('<',num2str(th1g(k)),num2str(th2g(k)),'>'); %where th1g(k) and th2g(k) are float
 fprintf(s,invMsg);


 fclose(s);
 delete(s);

For the Arduino's code, my idea is to memorize num2str(th1g(k)) and num2str(th2g(k)) in two dimensional array. Then convert its elemnts in float. But i don't know to do it.
Thank a lot to everyone help me and sorry for my imperfect english. :slight_smile:

I don't know Matlab. The examples in Serial Input Basics should help on the Arduino side. There is also a parse example.

...R