cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

problem plotting data derived in a nested FOR Loop

remslie
12-Amethyst

problem plotting data derived in a nested FOR Loop

Hi,

I have a problem plotting some data generated in a matrix derived from a nested FOR loop. I seem to have lots of problems with nested loops. The calculation proceedure is calculating fatigue crack growth from an initial crack size (depth = a and length = 2c) when exposed to stress levels applied a number of times in a block (day). The output matrix X looks to have the right data in columns but this does not seem to plot correctly?

Is there a problem with the FOR loop logic/syntax or the way I am calling the data up for the plot?

Any assistance would be appreciated.

Thanks

ross

1 ACCEPTED SOLUTION

Accepted Solutions

Alan,

Yep it is! I have used similar syntax previously but there is obviously some subtle problem with this latest effort. One again I am indebted to you for the correction. It is frustratingly simple!

Cheers and have a good day.

Ross

View solution in original post

5 REPLIES 5

You haven't defined j outside of the program that calculates X. You need to set j:=0..last(cycles). However, I can't really test this as you haven't supplied files "cycles.txt", "comp1membrane.txt", "comp1bending.txt".

Alan

Alan,

I am amazed and grateful at your enthusiasm to help out.

I have attached the 3 input files and would appreciate if you can find a problem.

Cheers

ross

remslie
12-Amethyst
(To:remslie)

Now with attachments.

Thanks

Ross

Is this what you were expecting to see?

BS.PNG

Alan

Alan,

Yep it is! I have used similar syntax previously but there is obviously some subtle problem with this latest effort. One again I am indebted to you for the correction. It is frustratingly simple!

Cheers and have a good day.

Ross

Top Tags