Well the struct is saved in an m-file (as a function)...
function [ Actor ] = IndataActorsLund3
%Actor 1
Actor{1}.Name='Räddningstjänsten Syd';
Actor{1}.ExpertNames={'Saknas?'};
Actor{1}.Units={'Saknas?'};
Actor{1}.Titles={'Saknas?'};
Actor{1}.NbrGoals=5;
Actor{1}.Goals={'Trygghet för medborgare', 'Bränder och andra olyckor ska minska','Öka kunskapen angående olyckshantering och riskmedvetenheten', 'Påbörja insats inom 10 minture i 90% av prioriterade olyckor', 'Bryta negativ trend vid insats inom 15min'};
Actor{1}.NbrActivities=6;
Actor{1}.Activities={'Tillsyn, remishantering','Informationsinsatser', 'Internutbildning', 'Externutbildning', 'Skadeavhjälpande insats', 'Olycksutredning','','','',''};
Actor{1}.MatrixActGoals=[...
3 4 3 4 3;
5 3 4 2 2;
3 3 1 4 5;
4 3 4 2 2;
5 1 1 5 5;
3 3 2 3 3];
Actor{1}.NbrInfluencingFlows=1;
Actor{1}.InfFlowType(1)=19;
Actor{1}.InfFlowMatrix{1}=[...
0 0 0 0 0 0 0;
0 0 0 0 0 0 0;
0 0 0 0 0 0 0;
0 0 0 0 0.4 0.6 1;
0 0 0 0 0.2 0.5 1;
0 0 0 0 0 0 0];
Actor{1}.NbrDependentFlows=4;
Actor{1}.DepFlowType(1)=1;
Actor{1}.DepFlowMatrix{1}=[...
0 0 0 0 0 0 0;
0 0 0 0 0 0 0;
0 0 0 0 0 0 0;
0 0 0 0.1 0.3 0.5 0.7;
0 0 0 0.6 0.8 0.9 1;
0 0 0 0 0 0 0];
.... (and about 1000 more rows)
end
Than I have created a GUI (with GUIDE) to add and change data within the struct. So I read in the file and do changes in the file with several different fprint commands. And struct gets saved in the m-file as well that is already taken care of. Now I don´t know the best way to assign the struct to a variable.