Matrix Computations w/out using Loop
10 views (last 30 days)
Show older comments
Hello, Is there a way to compute standard deviation of a large dataset w/out using a loop? I'm trying to use a loop now and I have a RAM/memory storage problem when I try and calculate the sdev for 125 files of hourly 3-day data for many grid points. Maybe there is a way to do this to accumulate the hours (24 hours x 72 hour increments) for one year, which is about 125 times or 125 files. Each file contains an array of 450 x 600 x 72 matrix of wind speed and I'm trying to compute the standard deviation for each grid point for the 125 file period, which is equal to about one year. And, I have 26 years and for each year I need a standard deviation of wind speed for each grid point. thank you,
0 Comments
Answers (1)
Steven Lord
on 20 Oct 2017
If the data files are too large to read all of them into memory at once, try creating a datastore and using that datastore to create a tall array on which you can compute. See this section of the documentation for more information on datastore and tall.
One word of caution: if you're using a release older than the current (which right now is release R2017b) you'll want to find the version of the page to which I linked above in your locally installed documentation. There have been many new features introduced in datastore and tall in the past several releases, so by referring to your locally available documentation you'll see just those features available in your release.
0 Comments
See Also
Categories
Find more on Special Functions 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!