Skip to main content
1-Visitor
January 19, 2016
Solved

Problem w/ vector notation in geotechnical calcs

  • January 19, 2016
  • 6 replies
  • 3245 views

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.

Best answer by MJG

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

6 replies

15-Moonstone
January 19, 2016

Hello

You start your program with a loop

For i €1, 2.4

If I'm not mistaken?

Kind regards.

Denis.

1-Visitor
January 19, 2016

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.

1-Visitor
January 19, 2016

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.

1-Visitor
January 19, 2016

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

jonesn31-VisitorAuthor
1-Visitor
January 19, 2016

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").