AmesimKnowledge

Simple examples > Temporal Analysis

MATLAB script

Copy

% Create a 1D map for FXA01-1
cd 'c:\AMETest'
theta = [0 10 10.1 180]
K = pi/180*[100 100 1000 1000]
fx2ame(theta, K, 'varspringrate.data')
ameputp('scrdemo', 'SIGFXA01 instance 1 name of ASCII file','varspringrate.data')

% Running a simulation and getting results
sim_opt = amegetsimopt('scrdemo')
sim_opt.startTime = 0.0
sim_opt.finalTime = 1.0
sim_opt.printInterval = 0.01
amerunsingle('scrdemo', sim_opt)

% Post-processing the results
[Results, Varnames] = ameloadvarst('scrdemo', {'MECRL0A_1 shaft angle at port 2 [degree]'});
fprintf('Angle at time %f s is %f deg\n', Results(1, end), Results(2, end))
plot(Results(1,:), Results(2,:), 'r');

Figure 20: Angle at 1.0 s is 0.113050deg

Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Scripting/xid1133457 · retrieved 2026-07-17