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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Problem w/ vector notation in geotechnical calcs

jonesn3
6-Contributor

Problem w/ vector notation in geotechnical calcs

I'm having difficulty having my Mathcad Prime 3.0 sheet perform calculations containing vectors.

The attached documents indicate my issue. For example, if I define a range variable, i, and a column vector, s'_u that I want to reference in my preceding calculations, I would like to say that alpha is calculated each time there is a s'_u value...thus making the calculated alpha variable a column vector of equal size. I hope my problem makes a little more sense once you take a look at the attached sheets.

1 ACCEPTED SOLUTION

Accepted Solutions
MJG
18-Opal
18-Opal
(To:MJG)

Also, here's an alternative solution without the need to define any range variable.  It utilizes the "vectorization" modifier.

View solution in original post

6 REPLIES 6
DenisJaunin
15-Moonstone
(To:jonesn3)

Hello

You start your program with a loop

For i €1, 2.4

If I'm not mistaken?

Kind regards.

Denis.

MJG
18-Opal
18-Opal
(To:jonesn3)

I seem to recall there being an issue if you use the in-line evaluation after defining "i".  Try leaving your definition as i:=1,2..4 and leave off the evaluation equals sign at the end.

With the in-line evaluation, I believe Mathcad converts the range variable into a matrix.

MJG
18-Opal
18-Opal
(To:MJG)

Also, I just noticed that you defined i as 1-4, but you did not set ORGIN as 1 (note s'u[3/pa = 1.777, which is the fourth term in s'u/pa).  You either need to set ORIGIN:=1, or define i as 0..4.

MJG
18-Opal
18-Opal
(To:MJG)

It appears the in-line evaluation was not the issue.  Only your definition of i or ORIGIN:

MJG
18-Opal
18-Opal
(To:MJG)

Also, here's an alternative solution without the need to define any range variable.  It utilizes the "vectorization" modifier.

jonesn3
6-Contributor
(To:jonesn3)

Thanks for all the help. You solutions and improvements to the worksheet have helped a lot!

I made some changes and it seemed that changing the range variable so it didn't behave like a column vector was the solution (I removed the "=" after defining "i").

Top Tags