How to take 4 variables and do a calculation on them then update to a constant stream of data

1 次查看(过去 30 天)
I have a constant stream of data coming into my program from an arduino. I want to graph the data but I need to create an acceptable variance in order to do that. I have created a user input to tell me their acceptable variance and then I'm stuck on what to do. My psuedocode for what I want to do is this:
% take 4 values of data and sort them into an array
% calculate the standard deviation of those 4 values
% if standard deviation < acceptable variance
% plot
% else
%
% end
I guess my question is, how do I take 4 values from my constant stream of data, do the calculation, plot that, then update the 4 values again...?
Thanks in advance

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Directed Graphs 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by