Skip to main content
14-Alexandrite
September 27, 2024
Solved

Defining the layers

  • September 27, 2024
  • 3 replies
  • 7688 views

Last time we wrote this function to classify soil layers. I need to show that in the plot can that be possible in mathcad ?. I need to connect the table with the plot . so it draws horizontal marker whenever the layer changes. or change colors ..any kind of change to make it possible for the reader to understand it changes layer type

Like (y ) will be both z and ztop to draw the plot . 

z is the depth 

ztop the thickness of the layers

YA_10963798_0-1727438206326.png

YA_10963798_1-1727438563293.png

 

 

Best answer by Werner_E

OK, upon rethinking I guess that two colors are all thats needed

Werner_E_0-1727456710153.png

 

3 replies

25-Diamond I
September 27, 2024

Not sure but cold it be that you are looking for something like this

Werner_E_0-1727447286292.png

It would also be possible to color the various section according to their depth, but this would mean that we have to split both vectors i  various subvectors and use them in the plot, which also means that you have a lot of entries (8) at both axis and would need to manually add or remove entries it the number of z.top values changes.

 

Prime 10 file attached

 

Werner_E25-Diamond IAnswer
25-Diamond I
September 27, 2024

OK, upon rethinking I guess that two colors are all thats needed

Werner_E_0-1727456710153.png

 

14-Alexandrite
September 30, 2024

Dear Werner, 

Is it possible to merge these to programs together. I need to show the levels in the plot in the left , I couldn't do that because it shows error . instead of using only q12 I need to use The Qcza which contains all of the qcza...

I previously used z12 because it is the longest. So it is okay to use Qcza and z 12 not Z 

I also have a mistake , I couldn't include the unit of the infinity 

YA_10963798_0-1727677694771.png

YA_10963798_1-1727678270713.png

Unfortuantely, I couldn't open the sheet you sent because it is higher version than mine. I use prime 9

 

Thanks in advance 

25-Diamond I
September 30, 2024

Better always state the version of Prime you are using.

 

I guess the errors you made were already corrected by Stuart.

You misinterpreted the 1x2 matrix with the units as a 1 x 4 matrix. I used the implicit unit multiplication (Ctrlk-Shif-U) and not an explicit multiplication sign between NaN and the units.

You missed the unit meter for the infinity "value".

 

But it still does not make much sense to use the full combined vector Q.cza as first argument and the vector z[12 as the second one, as only a small part of the plot would show.
You would have to use the combined vector Z as second argument, but probably my program would fail because it assumes the values in the second argument to be sorted by size. So it would be needed to change the function splitIn2 to cope with a vector z where sorted vectors are stacked and separated by NaN's.

Instead if doing so, I wrote a separate function splitAll which you can call with q.cza and z which loops through the vectors,uses the original splitIn2 function and stacks the 14 results one on top of the other:

Werner_E_0-1727705821435.png

 

Prime 9 file attached

 

14-Alexandrite
September 30, 2024

That is exactly what I needed . Thank you so much

25-Diamond I
September 30, 2024

Thought it could be nice to indicate the various depths that way

Werner_E_0-1727711660992.png

Of course you can combine this with the other two ways, drawing horizontal lines and drawing the traces in different colors.

 

Prime 9 sheet attached

 

14-Alexandrite
September 30, 2024

wowww that's impressive 

thank you so much