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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Abolute value truncates vectors?

dsochor
10-Marble

Abolute value truncates vectors?

In that attached MathCAD 14 worksheet I am attempting to find the absolute value of a vector divided by a number. For some reason, MathCAD is giving me a single value. Because they look similar, I double checked that I am using absolute value and not determinant.

Below this I tried to use an index value to perform the calculation one-by-one; but that did not work. In the first instance, the result is three periods; what dies this mean. In the second instance I received an error "This array index is invalid for this array." Is it not capable of counting through the vector in this way?

As always, I am indebted to the PTC Community for all the help I have received in making MathCAD greatly increase the efficiency of my work.

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:dsochor)

The absolute value of a vector IS a scalar. I would be rather in despair if Mathcad would return a vector here.

To get what you are after, again, vectorizing is the solution!

The problem you had in doing it manually was, that mathcad by default counts indices beginning with zero, not with one. This is controlled by the system variable ORIGIN. Usually its a good idea to leave it at the default value 0.

So if you change your range variable i to go from 0 to 3, your manual approach works, too

absolute_value2.png

View solution in original post

2 REPLIES 2
Werner_E
25-Diamond I
(To:dsochor)

The absolute value of a vector IS a scalar. I would be rather in despair if Mathcad would return a vector here.

To get what you are after, again, vectorizing is the solution!

The problem you had in doing it manually was, that mathcad by default counts indices beginning with zero, not with one. This is controlled by the system variable ORIGIN. Usually its a good idea to leave it at the default value 0.

So if you change your range variable i to go from 0 to 3, your manual approach works, too

absolute_value2.png

Thank you again Werner!

Announcements

Top Tags