if ~isempty(instrfind)fclose(instrfind);delete(instrfind);endA = zeros(64,1);B = zeros(64,1);C = zeros(64,1);D = zeros(64,1);Arduino=serial('COM3','BaudRate',9600);fopen(Arduino);writedata=uint16(500); %0x01F4
fwrite(Arduino,writedata,'uint16') %write datac
for i=1:64 %read 64 lines of data
A(i,:) = fscanf(Arduino,'%f');end
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 0-by-0.
Error in testing (line 15)
A(i,:) = fscanf(Arduino,'%f');
Best Answer