Azzera filtri
Azzera filtri

Solving out of memory for 4D array filled in for loop

1 visualizzazione (ultimi 30 giorni)
I am trying to determine the optimum set of parameters for a simple ice melt model by comparing the result of the simple melt model with that already calculated earlier using a more complex model. At the moment I run through all the possible parameters on different dimensions to create a 4D array of the simplet model melt called 'M', where the dimensions are (variations in parameter 1, variations in parameter 2, variations in parameter 3, time). So I then have one array with all the possible melt time series with the simple model. I then find the parameter set with the maximum Nash Sutcliff efficiency between the simple and complex model outputs, therefore finding the 'best' set of parameters.
However the M array is too large to fit into memory, and so the code will get a certain way through before there is an error.I have thought about using tall arrays to solve this but this seems to be more for when you already have a large dataset, or you can create one in a file. I can't find out how to create a 4D array using datastore. I also thought of splitting the M file into chunks are writing multiple loops but this seems a messy appraoch.
So is using tall arrays a sensible approach for this, and if so how would I implement it within the loops?
Or do any of you have a completely different way of solving the problem I have without making a massive M array?

Risposte (0)

Categorie

Scopri di più su Linear Algebra 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!

Translated by