clearclose allclca = arduino('COM6','MEGA2560');v=0;i = 1;while (i<50) v = readVoltage(a,'A11'); if(v>2.2) writeDigitalPin(a,'D13',0); else writeDigitalPin(a,'D13',1); plot(i,v,"r") ylim([0 5]); xlim([0 5]); hold on i = i +1 ; endend
MATLAB: How to plot a graph? I’m getting a blank graph.
@
Best Answer