how to convert this structure in simple array???
Info
This question is closed. Reopen it to edit or answer.
Show older comments
nPop=30;
firefly.Position=[];
firefly.Cost=[];
firefly.Load=[];
% Initialize Population Array
pop=repmat(firefly,nPop,1);
1 Comment
KSSV
on 11 Jul 2017
Can you elaborate? What you are expecting?
Answers (1)
Star Strider
on 11 Jul 2017
0 votes
Since I do not know what types of data are in your structure, I would create a table from it. Use the struct2table (link) function for that.
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!