Showing results for 
Search instead for 
Did you mean: 

Import mass acceleration parameter from amesim to matlab


Hi all,

So i am new to amesim and am trying to import the acceleration of a mass in amesim into matlab. 

But the only 4 parameters that i can access are velocity distance force and mass (see example1.PNG) 

Now i now there is an additional parameter acceleration which i can see in the external parameter window(see example2.PNG) the problem is i just cant figure out how to enable it so i can access it in matlab aswell. 



Jaimie Vranckx


Re: Import mass acceleration parameter from amesim to matlab

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi @JaimieVranckx,


if you want to use the acceleration signal in your sketch during the simulation and connect it to a Simulink interface for example, you will have to use an acceleration sensor plugged to the mass to output this signal.



If you only want to retrieve the time trace of the acceleration variable offline, you can use the Matlab scripts that we provide to extract that data. See this extract of the help of amegetvar script:



So this would allow to create a vector with all the acceleration values using something like:

[R,S] = ameloadt('yourmodelname')

time = amegetvar(R,S,'time [s]')

acc = amegetvar(R,S,'MASS002_1 acceleration at port 1 [m/s]')