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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

problem plotting data derived in a nested FOR Loop

remslie
14-Alexandrite

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

ACCEPTED SOLUTION

Accepted Solutions
remslie
14-Alexandrite
(To:AlanStevens)

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

remslie
14-Alexandrite
(To:AlanStevens)

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
14-Alexandrite
(To:remslie)

Now with attachments.

Thanks

Ross

Is this what you were expecting to see?

BS.PNG

Alan

remslie
14-Alexandrite
(To:AlanStevens)

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

Announcements

Top Tags