Thank you! That helped a lot.
Sorry, but I have another question.
I was able to plot the sensor value continuously in the while loop - this is the orange plot in the attachment. (
Phidgets Matlab Plot.png
)
Ultimately I would like rescale the values in the while loop so they range between 0 to 100 based on the min and max of the sensor value (it's a bend sensor).
I used the following equation:
norm = ((analogin - sensor_min)/(sensor_max-sensor_min))*100
When I applied this equation in the while loop it only calculated '100' and '0' - this is the blue plot in the attachment.
If I apply the same equation to the array that I originally collected then I am able to get the graph I want, but this is after the fact - not in real time. This is the purple plot.
Does this have something to do with how the data is being acquired? Is there something else I can do to achieve the purple plot in real time?
Thanks again for all of your help.
You do not have the required permissions to view the files attached to this post.