I've created a model and programmed a simple mos-script (see code) to simulate this model multiple times for two parameters (j0 and u). The simulations results are saved in 253 .mat-files(SimResults-0.mat to SimResults-252.mat).

Now i would like to

1. get (extract) the final values of each of these files,

2. save these values in a .mat or .csv file and

3. create a 3d plot (is this possible?)

but i have no idea how to realize this!

CODE

openModel("LLKReg.mo")

for i in 0:22 loop

for j in 0:10 loop

cd simresults

simulateExtendedModel("LLKReg", 0.0, 10000.0, initialNames={"u","j0"}, initialValues={i,j}, finalNames={"T2"}, resultFile="SimResults-"+String(i+j*23));

// T2 is an unknown model variable, u and j0 some parameters

end for;

end for;

for i in 0:22 loop

for j in 0:10 loop

cd simresults

simulateExtendedModel("LLKReg", 0.0, 10000.0, initialNames={"u","j0"}, initialValues={i,j}, finalNames={"T2"}, resultFile="SimResults-"+String(i+j*23));

// T2 is an unknown model variable, u and j0 some parameters

end for;

end for;

I hope you can help me

THANX in advance saiph

Powered by Invision Power Board (http://www.invisionboard.com)

© Invision Power Services (http://www.invisionpower.com)