Using the function movmean
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello, so i have a data set of average wave heights taken every 10 minutes for the last 60 years. I want to use the function 'movmean' to give an 8 week moving average of wave heights. Any idea how I might go about this?
0 Commenti
Risposte (1)
Image Analyst
il 23 Apr 2017
10 minutes for 8 weeks is 8064 elements I believe. So just do
averageWaveHeights = movmean(waveHeights, 8064);
That's pretty obvious, so I'm wondering what the real problem is. Like your elements are actually not every 10 minutes or something. Even if they weren't exactly 10 minute, it wouldn't matter much as long as the total window width covers 8 weeks. Did you try movmean() at all yet? What was the problem you had with it?
3 Commenti
nlm
il 7 Mag 2020
How to calculate a 10 day average when the timeseries has duplicate dates. I do not want to average the dupliate dates priorly. I want to include them in the 10 day average. When I use movmean, I get this error, any suggestions ?
Error using builtin
'SamplePoints' value contains duplicates.
Error in datetime/movmean (line 105)
y = builtin('_movmeandt', args{:});
Image Analyst
il 7 Mag 2020
Use unique() to remove duplicates. Start a new question and attach your data if you still have problems.
Vedere anche
Categorie
Scopri di più su Logical in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!