How do I calculate 30 minute average from 10 minute data??
1 view (last 30 days)
Show older comments
I have excel file 10 minute data. 1st column is date and time and 2nd onward data. From 10 minute data, I want to calculate 30 minute average. For reference please find attachment of input file and out put file.
3 Comments
Image Analyst
on 23 Jan 2017
I don't understand. Do you or do you not have an original Excel file that you want to import into MATLAB with xlsread()? After you process your numbers in MATLAB (regardless of how they got there), do you or do you not want to export them to an Excel workbook with xlswrite()?
And how do you propose to compute means of 30 minute sections if you don't use a moving mean?
Answers (2)
Image Analyst
on 23 Jan 2017
Edited: Image Analyst
on 21 Oct 2020
Nothing was attached. You can use movmean() or conv()
smoothedData = conv(data, [1, 1, 1] / 3, 'same');
2 Comments
DINUMOL VARGHESE
on 21 Oct 2020
Sir, i imported the power curve from excel and i need to do moving average in matlab and show the results.how is it possible
Image Analyst
on 21 Oct 2020
You can use my code above, or use the newer movmean().
To show the results, why not use plot()?
Jan
on 23 Jan 2017
If you really want to use an Excel file as input and as output, it would be much easier to do this in Excel: http://www.excel-easy.com/examples/moving-average.html
0 Comments
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!