Skip to main content
14-Alexandrite
July 28, 2025
Solved

Array Index Invalid

  • July 28, 2025
  • 2 replies
  • 912 views

Hello,

 

I am trying to build a Mathcad sheet to find pile capacity. The maximum number of soil layers available is nine (9). The user can choose to use all or, some of the layers within this 9. I am trying to build a logic to assign unit weight based on the layers I have subdivided to. The issue is if all layers are not being inputted, then the logic for unit weight says "Array Index invalid". Please help on this issue, my version is Prime 10.

fahmed2_0-1753723909676.png

 

Thanks

Best answer by terryhendicott

Sorry attached file was version 11

here is version 10

Cheers

Terry 

2 replies

21-Topaz II
July 28, 2025

Hi,

I suggest an input table like this:- 

Capture5.JPG

Capture.JPG

 

Saves the steps turning input into vectors as the table creates them.

Rows for less or more layers in a problem can be easily adjusted and sheet corresponds to these changes using last()

Capture2.JPG

Assigning depths of the layers is trivial

Capture3.JPG

As is finding the layer the pile stops in

Capture4.jpg

Cheers

Terry

ttokoro
21-Topaz I
21-Topaz I
July 28, 2025

l is only 0 to 2 index. So use Try on error and get below result.

 

 

image.pngimage.pngimage.pngimage.pngimage.pngimage.png

t.t.
21-Topaz II
July 29, 2025

Hi,

Now for the second part getting the value of Gamma.

Setting the water table in the depth of the pile for demonstration.

Capture.JPG

Gets the following Gamma

Capture2.JPG

Cheers

Terry

21-Topaz II
July 29, 2025

Sorry attached file was version 11

here is version 10

Cheers

Terry