Hello, i came across this code.
plot_handle=plot(zeros(num_samples,2));
then in another function which is called update the plot.
i saw this.
data = getdata(daq_object,num_samples);for i = 1:length(plot_handle) set(plot_handle(i),'YData',data(:,i));end
I don't get how the set(plot_handle(i),'YData',data(:,i)); works, beacuse in the plot_handle function, i only have num_samples as input.
Best Answer