Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Hi ,
Can we modify this function... below the program finds the average of all qs of CPTs in one layer.... Iike if we have 10 cpts each one has 100 qs in one layer ..it sums all the cpts and finds the q of all of them in one layer..
What I need now is to find the average q value of each CPT separately in each layer ..like each brown line in the plot alone .. Can you help me with that .?.
I attached the same sheet you used previously in the thread. Thanks in advance
Solved! Go to Solution.
Easiest way to modify the existing program was to create a nested 14x1 vector but of course it would not be difficult to convert it to any of the other suggested data structures if needed.
Hi,
To do anything useful we need the excel data file or files
Cheers
Terry
Sorry I forgot to attach it .. It was attached in the orginal post. Thank you for pointing that out
I hardly can remember and I don't know what CPTs, qs and "the q" should be.
I guess layers are depths limited by values given somehow in a nested vector z? Or, no, I also see a vector stop!?
Actually I don't know what kind of change you would need and have no idea what i did way back with this little program you show.
10 vertical lines where we now have just one? How would you distinguish between all of them?
Which data structure you do expect any results (whatever they may be) to be in? As I see it its currently a simple 8x1 vector of pressure values (avg).
I see that I had played around a lot with various plots and calculations. Maybe it would help to delete all elements in the sheet which are not mandatory to the final result...
And please - don't use variable names like "rows" which is also the name of a built in function!!
EDIT: Just had a quick look at the sheet and I guess what you are looking for are 14 separate average values for every of the 8 layers, right?
I also guess that you would not need any plot as this would be too confusing anyway and the program you show is only calculating the values (the data structure for the plot was made in in a different routine - Avg)
So the question still would be in which way you would need the data returned.
Possibilities are:
a 14x8 matrix,
a 8x14 matrix,
a nested 14x1 vector which consists of 8x1 vectors,
a nested 8x1 vector which consists of 14x1 vectors.
or anything else?
Easiest way to modify the existing program was to create a nested 14x1 vector but of course it would not be difficult to convert it to any of the other suggested data structures if needed.
A plot of all 14 averages for each layer sure would look too confusing, but we could highlight one of the 14 traces and its averages.
Of course you could use a fancy slider control to chose the index of the trace to show.
I get notification from ptc community late , I just saw the answer. Anyway, I think that will work perfectly ..
I really can't thank you enough for your effort and help .. you really always take the answer to an excellent level . I appreciate your help and time.
If you have any question in civil engineering just let me know . Maybe one day will help you in your house building.
Regards,
Yusra
@YA_10963798 wrote:
I get notification from ptc community late , I just saw the answer. Anyway, I think that will work perfectly ..
I really can't thank you enough for your effort and help .. you really always take the answer to an excellent level . I appreciate your help and time.
If you have any question in civil engineering just let me know . Maybe one day will help you in your house building.
Regards,
Yusra
You're welcome and thank you for the offer.
But I think that at a certain age one should no longer think about embarking on the adventure of building a house 😉
hhhhh ... I always think that you are 30 or 35 years old ...anyways you are welcome & don't worry I'm good at my work I will be happy to help you.
@YA_10963798 wrote:
hhhhh ... I always think that you are 30 or 35 years old .
double it 🙂
WOWW , that's astonishing. Wish you all the best .