Info
This question is closed. Reopen it to edit or answer.
how can i store the solution (3D mtarix) and its value for a population of N
1 view (last 30 days)
Show older comments
i have a population of N elements and each produce a certain solution configuration 3D matrix( for example solution X is X(:,:,1)=[1 2 3;4 5 6] and X(:,:,2)=[7 2 3;9 5 8]) this configuration results in an objective function or penalty function equals to 90) i need to store all the solution configurations for all the N population and the corresponding penalty function so that i'll report the best solution reached and its value&configuration. i need it to be fast. thank you
0 Comments
Answers (1)
Matt J
on 16 Jun 2019
Edited: Matt J
on 16 Jun 2019
So the question is how to store a set of 3D matrices? Why not use a 4D matrix
Configs(:,:,:,1)=X1
Configs(:,:,:,2)=X2
...
Configs(:,:,:,N)=XN
or a cell array
Configs{1}=X1
Configs{2}=X2
...
Configs{N}=XN
5 Comments
Matt J
on 17 Jun 2019
You're welcome, but please Accept-click the answer to indicate that it helped you.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!