Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing Abaqus .inp file with Matlab

Status
Not open for further replies.

BigwillyJohnson

Mechanical
Joined
Apr 21, 2010
Messages
6
Location
US
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
 
Thx for the reply.

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

It only takes a few seconds.
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top