How to quickly/easily merge and average data in matrix in MATLAB? -
i have got matrix of airfuelratio values @ engine speeds , throttlepositions. (eg. afr 14 @ 2500rpm , 60% throttle) matrix 25x10, , engine speed ranges 1200-6000rpm interval 200rpm, throttle range 0.1-1 interval 0.1.
say have measured new values, eg. afr of 13.5 @ 2138rpm , 74,3% throttle, how merge in matrix? matrix closest values 2000 or 2200rpm , 70 or 80% throttle. don't want new data replace older data. how can make matrix take value in , adjust values take new value in account?
simplified have following x-axis values(top row) , 1x4 matrix(below): 2 4 6 8 14 16 18 20 measured afr value of 15.5 @ 3 rpm. if interpolate afr matrix would've gotten 15, value out of ordinary. want matrix take data , adjust other variables it, ie. average more data put in more reliable , accurate matrix becomes. in simplified case matrix become like: 2 4 6 8 14.3 16.3 18.2 20.1 averages between old , new data. i've read documentation concatenation believe problem can't solved function.
edit: clarify question, following visual clarification.
'matrix' keeps same size of 5 points whil new data point added. takes new data in account , adjusts matrix accordingly. i'm trying achieve. more scatterd data get, more accurate matrix becomes. (and yes green dot in case outlier, explains case)
cheers
this not matter of simple merge/average. don't think there's quick method unless have simplifying assumptions. want statistical inference of underlying trend. suggest using gaussian process regression solve problem. there's great matlab toolbox rasmussen , williams called gpml. http://www.gaussianprocess.org/gpml/
Comments
Post a Comment