File Exchange

image thumbnail


version 1.03 (955 KB) by George Papazafeiropoulos
Program for the extraction of Abaqus analysis results to Matlab


Updated 16 Aug 2017

View Version History

View License

Abaqus2Matlab is a program for the extraction of ABAQUS analysis results to MATLAB. It is an application which aims to provide a link between ABAQUS and MATLAB, which will enable ABAQUS users to perform postprocessing of ABAQUS results in MATLAB. It can be used to retrieve results from an ABAQUS analysis, which can be easily transferred from ABAQUS to MATLAB for further processing. It is written in MATLAB programming language and is available as source code distributed under a BSD-style license (see License.txt).
A new version of Abaqus2Matlab has just been released and I hope that it is of interest to you. This new release constitutes a very significant step forward in the development of this well-known software to connect Abaqus and Matlab. Abaqus2Matlab is now offered as an easy-to-install Matlab App that includes the following novelties:
1) The possibility to postprocess not only .fil files, but also .odb and .mtx
2) A new Graphical User Interface (GUI) that enables the user to easily request output variables and automatically creates a Matlab script with all the required information.
Everything has been extensively documented, including video tutorials. For more information visit
We hope that you enjoy it and we look forward to hearing your feedback.

If using Abaqus2Matlab for research or industrial purposes, please cite:
G. Papazafeiropoulos, M. Muñiz-Calvente, E. Martínez-Pañeda. Abaqus2Matlab: a suitable tool for finite element post-processing.
Advances in Engineering Software. Vol 105. March 2017. Pages 9-16. (2017)

For more information, please see:

Cite As

George Papazafeiropoulos (2021). Abaqus2Matlab (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (57)

Hley Ashleyed

Hi there!
Thank you for this software. When I run the Documentation.m file in MATLAB, it runs perfectly. However, the following errors arise when I type Verification.1980 in the command window of MATLAB:
Error using Fil2str (line 43)
No such file or directory

Error in Verify1980 (line 28)
Rec = Fil2str('1980.fil');

Could you please assist on solving this issue? Thank you in advance.

@jyotshna bali
You can use the newest version of Abaqus2Matlab (soon available at to automatically modify any Abaqus input file, and in this way you can automatically create or delete nodes and/or elements, modify loads and boundary conditions, contact definitions, etc. More specifically, you need the inp2Matlab library, that is included in the latest release of Abaqus2Matlab.

jyotshna bali

I had few queries regarding the "abaqus2matlab" toolbox.

I have recently installed the abaqus2matlab toolbox, and my work on load analysis involves modifying the Loads acting on the Wing of an aircraft. As the number of elements on the wing remains plenty, I wanted to use this toolbox to complete this assignment.

I just wanted to make sure that it was possible to create new nodes, element sets (using Abaqus GUI), and applying/modifying loads on these sets using the abaqus2matlab toolbox. I hope the toolbox is sufficient, as I am not proficient in Python scripting, or UMAT, or VUMAT.

Kindly provide clarification on the extent of application of the "abaqus2matlab" toolbox.

@征涛 屈
Thank you for rating the app!
In order to extract the SDV variables you use the record key 5.
Also, execution of Abaqus analysis with a subroutine through Matlab needs special treatment, and cannot run in a simple syntax of the form "!abaqus job=<jobName>"
You can check the official website of the Abaqus2Matlab software ( ), or alternatively contact me through email ( )

征涛 屈

Hello, Thank you for the software.
I have just come into contact with this software, and I have encountered some difficulties at present. I hope to get your advice, and I will be very grateful!
I am using the ABAQUS/Explicit with a user subroutine VUMAT . Once I have created the inp file, I load it into the toolbox to modify it and export it.
I want to extract the state variable SDV of all element, but I can't find it in the options of the toolbox, so I set the output stress S first, and then manually change S to SDV in the inp file.
Next, use the commend to analyze and calculate: ABAQUS JOB =1 USER =VUMAT Interactive
But it always tells me there's a problem:
Abaqus Error: Analysis Input File Processor exited with an error.
Abaqus/Analysis exited with errors
Could you please tell me how to modify this situation?Thank you again.
Best wishes!

@ zahra zaiem:
Firstly, please ensure that the odb file is not open in Abaqus/CAE or Abaqus/Viewer, before running the Abaqus2Matlab script. If open, it may lock the rpy fil and prevent it from being read, giving thus the error.
Apart from this, please check that the input variables of the exploreFieldOdb.m function are correct, and that the current path of Matlab is the same with the folder in which the odb file exists.

zahra zaiem

Hello, Thank you for the software.
I face this error during running with Matlab:
Error in rpyRead (line 82)
Error in exploreFieldOdb (line 153)

when I run .inp file with Matlab both "abaqus.rpy" and "job_name.odb" created in the A2M_GUI_Output File. But I don know why it has a problem in finding .odb file?

I would be thankful if you could guide me.

@ kehui cheng
Thank you for your consideration.
Could you tell me more details about this error?
Ideally, you can send me an email at

kehui cheng

Dear author:
Thanking for you software,Have you ever had this problem?The question is“This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.”,Do you have a better solution

Dear Math prince:
You can find useful information about how to install Abaqus2Matlab in the following link:
An extensive Documentation of Abaqus2Matlab can be found here:
Also, you can download a template Matlab script which shows how Abaqus2Matlab is used programmatically here:
If the above do not help, please send a message to the Abaqus2Matlab work team through the "CONTACT" tab of the website ( )
Thank you very much for your interest!
Best regards.

Math prince

Dear author:
Thanking for you software,after but i see the Function ,i still can not lanuch this software,can you give me some setup detailed process? thanks again.

Adam Oskarsson

as i understand it:
System(['abaqus job=' Inp_file]) is supposed to start a job in order to acquire a .fil. Is this correct? Then i only have to find out how to run this line with brigade:).

Adam Oskarsson

Now i get a parsing error when the python script "" is run by the program. Do you have any idea as to why this would happen?

@Adam Oskarsson
This could be possible. I have never used this version of Abaqus.
In any case, you can manually edit the post processing script that is generated by Abaqus2Matlab so that it runs properly with your Abaqus version. Actually, Abaqus2Matlab needs only a proper results file (*.fil) or output data base file (*.odb) to load Abaqus results into Matlab and vice-versa.

Adam Oskarsson

Hey again!

Im using a version of abaqus called brigade. Could this be the problem? Because i can't seem to find the simulia files.

Dear Adam Oskarsson,
Thanks for your interest in the Abaqus2Matlab app. Most possible cause for this is that an installer has changed the windows environment variables.
In the command prompt type "echo %path%" to show the current paths. The path to simulia is likely gone.
To access the environment variables right click the "This PC" icon then choose properties. Select the "Advanced System Settings" tab and click "Environment Variables".
At the "System variables" panel, choose "Path" then click "Edit".
Copy and save the old file in a notepad editor before modifying. Add "C:\Simulia\Commands" to the end and click OK.
Now you can see the new path and the "abaqus" command should work.
Check the Abaqus install directory for the correct path if the above solution does not resolve the issue. The location of the commands directory could be something like the following:
-Any customer path defined during the installation

Adam Oskarsson


I have a problem when running the matlab script that is generated from abaqus2matlab. I get this message "'abaqus' is not recognized as an internal or external command,
operable program or batch file. " several times and at the end this error message "Output argument "out" (and maybe others) not assigned during call to "exploreFieldOdb".".

I guess the scipt isnt able to find the Do you have any idea to solve this?

Lionel Juillen AF

@Paolo Borlenghi: Thank you very much for your good words, Paolo! It is a pleasure that Abaqus2Matlab has been proven helpful to you. I wish you the best for your research and do not hesitate to contact me again if you have any problems.

Paolo Borlenghi

It is an extremely useful toolbox if you are doing optimisation with Abaqus! George was very kind and helpful explaining how to employ Abaqus2Matlab to obtain what I was looking for. Once again, thank you very much!

@jahanzaib ahmad: This is possible and easy, but it depends on the format of your model. There are two ways to import a model in Abaqus: (a) by developing some Matlab code which will automatically create an Abaqus input file that corresponds to your model, and (b) by developing some Matlab code which will automatically create a Python script which corresponds to your model, and then this Python script can be executed in Abaqus/CAE in order to import your model in Abaqus. I have been already coding some Matlab routines for the automatic development and importing of some simple models (e.g. rectangular shells or solids) in Abaqus/CAE, as well as the automatic parameterization of a given Abaqus input file so that it is created automatically through a Matlab function. All these will be incorporated in a future version of Abaqus2Matlab. If you want some help regarding exporting your 3d model to Abaqus, you can contact me at for more details.

jahanzaib ahmad

I m looking for the opposite ..MATLAB to abaqus . I want to export my 3d model to abaqus .Please

@harnoorsaini: Yes, the Abaqus2Matlab app can work with all user subroutines. Actually, Abaqus2Matlab does not interfere with subroutines since these are part of Abaqus execution only. Abaqus2Matlab operates after the Abaqus analysis has been successfully completed. I remain at your disposal for any further clarifications, if needed. Any opportunities for collaboration are also welcome.


Hi I am just getting started with your tool. Thanks for making it available. Does it also work with User materials? PS. I already have several MATLAB-ABAQUS scripts/workflows setup, could be interesting to integrate them in but let me first play around with your package.

Thank you very much for your kind comments about Abaqus2Matlab. What you want is very very easy! You can contact me via email at for further details.


Dear George
thanks for your great work which will aid my PHD work in ABAQUS simulation.It is a great job.
I want to automatically modify the relevant parameters in the inp and achieve the extraction of the natural frequency. However, I did not succeed in implementing this function. could you please help me?

Thank you Cainiao! This string describes an integer. Each integer begins with the character I, followed by a two digit integer giving the number of decimal digits in the integer, followed by the integer itself (written as decimal digits). The string 'I 41901' means the integer number 1901. Please feel free to ask your inquiries at the official website of Abaqus2Matlab:


Dear George
thanks for your great work which will aid my PHD work in ABAQUS simulation. Can you explain what the meaning of 'I 41901' in your code named Rec1901.m.


@Jim Jim:

Please check the following link and see if it fixes your error:

Jim Jim

I have trouble after running the Script in Matlab2018a, errors are shown below:
Access violation detected

Bui Phuong

Leon Phung

I have trouble after running the Script, error shown below:

Output argument "out" (and maybe others) not assigned during call to

Error in Script_Job1_A2M (line 59)

I would be very appreciated if anyone can help me on this.

Stephen Schwaner

Thanks for this extremely useful package. Is there any reason why there is not a function to read the deformation gradient, record key 90?

2nd version of Abaqus2Matlab released! Visit and give us your feedback!

Thank you very much Jin Yan!


Very helpful for my optimization research work. I was trying to write such a code on my own before and I know it is not easy. Thanks a lot! I will definitely cite your paper!

Diab Abueidda

Thanks a lot. It worked based on your answer.

Thank you for your interest in Abaqus2Matlab.
The issue that you describe appeared in a previous version of Abaqus2Matlab. More specifically, in the latest Matlab versions, the 'CollectOutput' parameter in the textscan function takes the values 0 (false) or 1 (true), whereas in the earlier Matlab versions the same parameter took the values '0' (false) or '1' (true). To ensure compatibility of Abaqus2Matlab with both the old and the new syntax, the Fil2str.m function has been modified by replacing:

C = textscan (fileID, '%s', 'CollectOutput', '1', 'delimiter', '','whitespace','','endofline','');


    C = textscan (fileID, '%s', 'CollectOutput', '1', 'delimiter', '','whitespace','','endofline','');
    C = textscan (fileID, '%s', 'CollectOutput',  1 , 'delimiter', '','whitespace','','endofline','');

namely if the try statement gives an error (which occurs for users of newer Matlab versions), then the catch statement is executed giving the correct result. The Abaqus2Matlab version that is uploaded here does not have this problem and is fully updated.

Diab Abueidda

Hey team,
When I type Verify8 for example, Abaqus runs and it creates the input, odb and other files. However, I get the following error:
Error using textscan
CollectOutput must be a numeric scalar.

Error in Fil2str (line 41)
C = textscan (fileID, '%s', 'CollectOutput', '1', 'delimiter', ...

Error in Verify8 (line 27)
Rec = Fil2str('8.fil');
Please advise

Dear Ngoc Thach Le,
Of course you can extract the results of two steps of an Abaqus analysis in Matlab using Abaqus2Matlab. At the website of Abaqus2Matlab you can either find some tutorials and examples or you can send an email at the Abaqus2Matlab work team (from the "CONTACT" tab).
Best regards.

Ngoc Thach Le

Dear George,
Thank you very much for this beautiful and great work. It would save us a lot of time indeed!
I have one question, can I use the code to extract same parameters (i.e. displacements) after two loading steps separately? I want to capture the changes after an extreme loading condition.

@Brani Dzepina: Thank you very much for your words. For further details of Abaqus2Matlab toolbox, you can check the official website:
@Ngoc Thach Le: Thank you very much for the rating. See for more information.

Ngoc Thach Le

Brani Dzepina

This will aid my PhD work in multiscale simulation greatly! George, you are a legend! Thank you!

Dear vahidar,
Thank you very much for your interest and rating.
You can contact the Abaqus2Matlab work team through, either by sending your inquiry to the work team under the CONTACT tab, or by posting under the FORUM tab. Normally, you will receive an answer within a few hours.

Vahid Aryai

Thank you for very much for Abaqus2Matlab.
Could you kindly let me know if it is possible to use this code for obtaining results from multiple Abaqus input files? Actually, I need to post-process the results of hundreds Abaqus analysis in Matlab.


Dear Mr Franzoni,

Thank you very much for your good comments about Abaqus2Matlab. I hope that it will be useful for your research.
For whatever problem you may have, please feel free to contact the Abaqus2Matlab work team through

Best regards,



I just started using your plug-in in my PhD research. First, I would like to congratulate you for the remarkable work and for making it available online.
As suggestion, I created a 'b' version of the Rec1980.m file to also accept buckling modal data.
In fact, I just add a flag which accepts 'Frenquecy' or 'Buckle' and for the 'Buckle' flag only '% number of digits of eigenvalue number', '% Eigenvalue number' and '% Eigenvalue' are calculated.

Federico Cecchini

Miguel Calvene

This is a great code! Easy to use and powerful!


Thank you so much, George. Your codes save me loads of time!

Rodrigo Muñoz

Dear Andrey,

Firstly, thank you very much for your feedback and rating. I would like to note that each record in the results file (fil) starts with an asterisk, which is found at most 7 positions before the first digit of the record key. The first number in each record shows the number of outputs contained in the record (which is maximum 80), and the second number of each record is the record key, i.e. the type of results written in the record. More details can be found at the Abaqus Documentation.
I do not know whether you have managed to handle the results file in its binary format, but I think that such files can be treated in a similar logic. Could you elaborate a bit on what you have said "parsing the whole output file at once"? What do you mean by this?

Thank you very much!

Best regards,


Andrey Melnik

Update to my previous comment. The Abaqus binary .fil seems to be represented as a sequence of binary frames: [frameSize1, frameContent1, frameSize1], [frameSize2, frameContent2, frameSize2], and so on. In my case frameSizei is a 32-bit integer storing value 4096, while frameContenti is 4096-byte long binary data. After removing parasitic fragments frameSizei, the file becomes a sequence of records, as described in Abaqus Analysis Guide Chapter 5.1.2. It is a shame I could not find this simple clarification in Abaqus documentation. Sorry for posting off-topic.

Andrey Melnik

Dear George, thanks for this extremely useful package. I have the following concern. As far as I understand, you determine the position of a record by looking for an integer identifier, e.g. ind=strfind(Rec,'I 210I'). In this case you require that the integer 10 is followed by another integer. I imagine such occurrences may be not exclusively specific to the record key and can be encountered elsewhere. Although you do an additional check that the 80-char record indeed starts at (ind-8) with '*', I suppose such coincidence is still possible and you'll get an error. What do you think?

Another question is if you considered parsing the whole output file at once instead of extracting records one by one? I tried to follow this route to parse the binary results output format, but was unable to find an exhaustive specification of that format. For instance, the "1921" record is preceded in binary format by 12 bytes of unknown nature. Best,

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!