Matrix Computations w/out using Loop

9 次查看(过去 30 天)
Randall
Randall 2017-10-20
回答: Steven Lord 2017-10-20
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,

回答(1 个)

Steven Lord
Steven Lord 2017-10-20
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.

类别

Help CenterFile Exchange 中查找有关 Special Functions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by