Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
how can i store the solution (3D mtarix) and its value for a population of N
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Matt J
am 16 Jun. 2019
Bearbeitet: Matt J
am 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 Kommentare
Matt J
am 17 Jun. 2019
You're welcome, but please Accept-click the answer to indicate that it helped you.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!