This Function (and the comments) were very useful. For my application I need to store the data coming in over the serial buffer (so that I can analyze later). I am having issues with record function. In particular it seems to add 1 to the MSb of each of the values that are read on the serial. I was wondering if you have ever used the record function or if you have ever had to store the values for further analyzing and if you might have any tips. Thanks
Can anyone kindly take a look at look my following errors. What should I do to get this to work please?
Index exceeds matrix dimensions.
Error in real_time_data_plot (line 34)
serialObject = serial(serialPort);