i have a Matlab program done with a real time plot that acquire data from a LDR sensor with arduino. Now i want to implement that program in a GUI and i'm facing some problems with ploting. Here is the part of my program that i dont know how to plot in GUI mode.
(...) While(1) state = a.analogRead(0); (...) axis tight drawnow; x = [x, state]; plot(x,'-*b'); grid on; end
The code must be in the OpeningFcn? Should i just copy paste the into there? What do i have to change in the ploting code? Thank you very much!