Plotting (Forces) in log file - 2nd match
I need to plot the Force vector over time using a sixDoFRigidBodyMotion solver.
Using the below script I managed to extract the "attachmentPt - anchor" and plot it with time without problems, but unsure how to extract the force vector using the getstatusoutput with grep command. Can someone enlighten me on this? Code:
Code:
|
Why not just get the index of the where the strings start?
something like int start = searchString(line,"attachment") Playing with the indices, other way would be playing with the format of the string given, but I don't how does it work in python. |
Thanks for the reply, I'm new to python as well and it has been a hit and miss by trial and error for me. Would be good if anyone can help me modifying this line for it to work.
Code:
status, data = commands.getstatusoutput('cat ' + fileName + '| grep translationDamper1') |
All times are GMT -4. The time now is 06:33. |