Overview
Comment:Return more information
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: faee6e2e730377eb6efb0904923d6d280074da02597a262ae67e251248d55456
User & Date: gawthrop@users.sourceforge.net on 2004-03-15 16:23:52
Other Links: branch diff | manifest | tags
Context
2004-04-07
12:17:43
Handles new Fig header line. check-in: edda44204d user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2004-03-15
16:23:52
Return more information check-in: faee6e2e73 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
16:23:31
Removed multiple-runs bug - now just runs once! check-in: 4a616b698e user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/lib/rep/ident_rep.sh from [3dabea9320] to [13f8601111].

102
103
104
105
106
107
108

109
110
111
112

113
114
115









116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133



134
135
136
137
138
139
140
  simpars.dt = dt;

  ## Identification
  [epar,Par,Error,Y,iterations,x] = ppp_optimise(system_name,x_0,par_0,simpars,u,y,i_par,Q,extras);
  
  ## Do some plots
  figure(1);

  title("Comparison of data");
  xlabel("t");
  ylabel("y");
  [N,M] = size(Y);

  plot(t,Y(:,M-n_y+1:M),"1;Estimated;", t,y,"3;Actual;");
  figfig("${sys}_ident_comparison");










  ## Create a table of the parameters
  [n_par,m_par] = size(i_par);
  fid = fopen("${sys}_ident_par.tex", "w");
  fprintf(fid,"\\\\begin{table}[htbp]\\n");
  fprintf(fid," \\\\centering\\n");
  fprintf(fid," \\\\begin{tabular}{|l|l|}\\n");
  fprintf(fid,"  \\\\hline\\n");
  fprintf(fid,"  Name & Value \\\\\\\\ \\n");
  fprintf(fid,"  \\\\hline\\n");
  for i = 1:n_par
    fprintf(fid,"$%s$ & %4.2f \\\\\\\\ \\n", par_names(i,:), epar(i_par(i,1)));
  endfor
  fprintf(fid,"  \\\\hline\\n");
  fprintf(fid,"\\\\end{tabular}\\n");
  fprintf(fid,"\\\\caption{Estimated Parameters}\\n");
  fprintf(fid,"\\\\end{table}\\n");
  fclose(fid);




endfunction
EOF
}

make_ident_numpar() {
echo Creating ${ident_numpar_file}
cat > ${sys}_ident_numpar.m <<EOF







>




>
|


>
>
>
>
>
>
>
>
>


















>
>
>







102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
  simpars.dt = dt;

  ## Identification
  [epar,Par,Error,Y,iterations,x] = ppp_optimise(system_name,x_0,par_0,simpars,u,y,i_par,Q,extras);
  
  ## Do some plots
  figure(1);
  grid;
  title("Comparison of data");
  xlabel("t");
  ylabel("y");
  [N,M] = size(Y);
  y_est = Y(:,M-n_y+1:M);
  plot(t,y_est,"1;Estimated;", t,y,"3;Actual;");
  figfig("${sys}_ident_comparison");

  figure(2);
  [n_par,m_par] = size(Par);
  grid;
  title("Parameter estimates");
  xlabel("Iteration");
  ylabel("Estimates");
  plot(0:m_par-1, Par, 0:m_par-1, Par,"x");
  figfig("${sys}_ident_pars");

  ## Create a table of the parameters
  [n_par,m_par] = size(i_par);
  fid = fopen("${sys}_ident_par.tex", "w");
  fprintf(fid,"\\\\begin{table}[htbp]\\n");
  fprintf(fid," \\\\centering\\n");
  fprintf(fid," \\\\begin{tabular}{|l|l|}\\n");
  fprintf(fid,"  \\\\hline\\n");
  fprintf(fid,"  Name & Value \\\\\\\\ \\n");
  fprintf(fid,"  \\\\hline\\n");
  for i = 1:n_par
    fprintf(fid,"$%s$ & %4.2f \\\\\\\\ \\n", par_names(i,:), epar(i_par(i,1)));
  endfor
  fprintf(fid,"  \\\\hline\\n");
  fprintf(fid,"\\\\end{tabular}\\n");
  fprintf(fid,"\\\\caption{Estimated Parameters}\\n");
  fprintf(fid,"\\\\end{table}\\n");
  fclose(fid);

  ## Save the data for later use.
   par_values = epar(i_par(:,1));
   save ${sys}_ident_est_data.dat y_est Y par_names par_values
endfunction
EOF
}

make_ident_numpar() {
echo Creating ${ident_numpar_file}
cat > ${sys}_ident_numpar.m <<EOF


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]