×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Parsing Abaqus .inp file with Matlab

Parsing Abaqus .inp file with Matlab

Parsing Abaqus .inp file with Matlab

(OP)
Hello All,

I am trying to write data to specific locations in the .inp text file using matlab.  My grand scheme' is to have matlab and abaqus work together to optimize a model.

I can write to specific places but the incumbent text gets pushed and moved around.

For example

if a line has the word "**PARTS"
and the next line has  "**"
and i write "12345678" to the first line

the result will be:
"12345678*" on the first line and whatever was on the third line will be on the second line

the text gets moved and messed up

Any help would be appreciated
Rick

RE: Parsing Abaqus .inp file with Matlab

use python if possible, much easier

RE: Parsing Abaqus .inp file with Matlab

(OP)
Thx for the reply.

I ended up using fgets and fprintf to rewrite the file.

It only takes a few seconds.

RE: Parsing Abaqus .inp file with Matlab

(OP)
After thinking about this I have another question.

Can python do the brute force math that matlab can do?

If so then I would see were I should cut matlab out of the picture completely.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources