What I'm doing is that I'm trying to control a servo motor using arduino and GUI, the gui has a two push buttons when to make the servo 0 degree and one to make it 90 ... when a press the push buttons it gives me this massage
"Undefined function or variable 's'."
Here is my coding in the opening function
clear a;
global a;
clear a;
a = arduino('com4','uno','Libraries','servo');
s = servo(a,5);
And here is my coding in the two push buttons
writePosition(s , 0);
writePosition(s , 0.5);
If anyone can help I would appreciate it