Skip to main content
14-Alexandrite
November 20, 2025
Solved

Drawing graphs in mathcad and finding the average

  • November 20, 2025
  • 1 reply
  • 600 views

Hi there 

Can you help to reach a graph merged to the classification I have 

I have this graph 

YA_10963798_0-1763643288759.png

and I did a classification to the data in this graph ... what I need now is to merge the classification with the graph and make them obvious layers and then find the average in each layer 

YA_10963798_1-1763643391781.png

like this 

YA_10963798_2-1763643612555.png

By obvious layers I mean > a program wil be able to say from z1 to z50 >> it is a sand layer and the average Q in that layer is 10 MPa ( as an example) 

Is that possible ? 

Thank you in advance .. the sheet is attached 

 

Best answer by Werner_E

So it looks that I was wrong when I counted 14 distinct layers. My program says there are 19.

As only layers with pressure above 25 MPa should be classified as "Grind" I classified layers with pressure below 0,1 MPa and pressures between 2 and 5 MPa as "undefined" as you didn't specify otherwise.

Furthermore as you did not say which class a pressure of exactly 0.2 MPa should be applied to, I have chosen "Clay".

Werner_E_0-1763657200090.png

So you may look for a table like this?

Werner_E_2-1763658175525.png

If had chosen to strip he unit for the average pressure because Prime unfortunately is not able to show MPa in the table and I considered the values in Pa to look too ugly and not clear enough.

Werner_E_3-1763658776089.png

 

 

1 reply

25-Diamond I
November 20, 2025

I don't see why you function "Class" uses argument "d". Actually its just "Class(q)" as classification depends on pressure q only.

 

The way you write that function would mean that "Grind" actually is found in three intervals of pressure:  (0 MPa; 0.1 MPa), (2 MPa; 5MPa) and everything largen than 25 MPa. Is this really as it should be?

 

There is also a small discrepancy as 0.2 MPa would be "Peat" as well as "Clay". The way you wrote it, "Clay" wins in case q=0.2 MPa.

 

Your hand-drawn diagram looks as if the different classes are not only contiguous in terms of pressure, but also in terms of depth. However, this does not necessarily have to be the case (and is not, indeed), which raises the question of how it should be handles as, for example, “clay” occurs at a depth of -2.87 m to -3.1 m, but also from -5.63 m to 12.27 m, with “grind” occurring in between, from -3.1 m to -5.63 m.
Should the average value of both “clay” areas be given together, or should this be handled as two separate areas (which would be more complex)?

As far as I can see in your data there are six separated areas of "grind" (including (0,0) as a singular point). four separate areas of "sand", three separate areas of "clay" and no "peat" at all.

Werner_E_1-1763650983037.png

Using a log scale at the abscissa we can see better that there are no values in the range of 0.1 MPa to 0.2 MPa ("Peat"). Of course the singular "grind" point at (0,0) is not display as 0 would be at minus infinity at the abscissa 😉

Werner_E_0-1763651969911.png

 

 

  1. So which average values should be calculated? Or how many - four or fourteen?
  2. An where exactly should we draw the vertical lines representing the averages?
  3. And what should be returned as the 'average' of the non-existing "peat" section?

BTW, didn't we had a thread with a very similar question in the past? Maybe this one?

14-Alexandrite
November 20, 2025

Hi Werner 

1) Grind should be only the values above 25 MPa < so I guess I wrote it wrong

2)

For the average value >  you said : for example, “clay” occurs at a depth of -2.87 m to -3.1 m, but also from -5.63 m to 12.27 m, with “grind” occurring in between, from -3.1 m to -5.63 m.>>> what I need to do in this layer where clay accours is to define these depths , and say from -2.87m to -3.1m the average q is 0.3 MPa ( by using average function for that specific layer) 

and then do the same for the following layer >>> so it repeats itself whenever the classification changes. 

see the yallow lines :  so instead of having so many qc in each layer I need only the average value . 

YA_10963798_0-1763654876386.png

I need to generate a table or matrices or what so ever showing where the layer starts and ends and what is average q in that layer. 

 

3)And what should be returned as the 'average' of the non-existing "peat" section? It can be (NAN) 

 

BTW it is not the same thread > previously in the calculation I already have the depths and the layers specified in a table ; this one 

YA_10963798_2-1763655285459.png

I knew where the layer starts and ends and we match the depths from CPT ( z) with the depths of the layer : 

YA_10963798_3-1763655408143.png

 

YA_10963798_4-1763655433654.png

Now I need to specify the layer and generate a table from there 

 

Thank you so much for your help . As always amazing 

Yusra

 

 

Werner_E25-Diamond IAnswer
25-Diamond I
November 20, 2025

So it looks that I was wrong when I counted 14 distinct layers. My program says there are 19.

As only layers with pressure above 25 MPa should be classified as "Grind" I classified layers with pressure below 0,1 MPa and pressures between 2 and 5 MPa as "undefined" as you didn't specify otherwise.

Furthermore as you did not say which class a pressure of exactly 0.2 MPa should be applied to, I have chosen "Clay".

Werner_E_0-1763657200090.png

So you may look for a table like this?

Werner_E_2-1763658175525.png

If had chosen to strip he unit for the average pressure because Prime unfortunately is not able to show MPa in the table and I considered the values in Pa to look too ugly and not clear enough.

Werner_E_3-1763658776089.png