Move average in the graph

Good Day all,
I have a 44568*2 and 437999*2 matrices, which I want to taking the average for each to calculate the residuals. Is there any sample command to do that.
your help is highly approciated
thank you

답변 (1개)

Adam
Adam 2015년 6월 25일

0 개 추천

If you simply want the average of all the values without any consideration of matrix structure then simply
mean( A(:) )
works for any numeric variable A. If that isn't what you want you need to be more specific.

댓글 수: 5

Lilya
Lilya 2015년 6월 25일
How to be more specific? the time series those I used are different in each size thus I want to average both of their values to calculate the residuals on one graph.
Adam
Adam 2015년 6월 25일
All you said was you had matrices of the given size. Without more information on how you want to average with respect to the structure of those matrices (e.g. average columns to give a 2-element vector or average rows to give a massive vector of results) the above works to simply average everything.
Lilya
Lilya 2015년 6월 27일
편집: Lilya 2015년 6월 27일
both of them columns and rows
Image Analyst
Image Analyst 2015년 6월 27일
lina, what do the numbers represent??? For example is each row a point, and the first column are the x values and the second column are the y values? It's that kind of explicit explanation that you left out and Adam was (and still is) wondering about. I really think you need to read these guidelines.
OK, then we notice that the two arrays have different number of points, so you can't simply subtract them because they don't match up point for point. So, do you need to interpolate them so that you get a common set of x coordinates so that you can then subtract the y values to get differences?
Lilya
Lilya 2015년 6월 29일
I was wrote another question here related to the same problem, this is it: http://www.mathworks.com/matlabcentral/answers/225618-how-to-calculating-hourly-average

이 질문은 마감되었습니다.

태그

질문:

2015년 6월 25일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by