Skip to main content
3-Newcomer
Sep 9, 2023 11:50 PM UTC
Question

How to assign vectors to a function - MathCad Prime 9

Hello friends, I am a newbie to Mathcad, could you please help me with this?
I'm trying to make a spreadsheet to determine the farthest vector from a line. Thank you

dfdafadf.png

 

 

 

 

 

6 replies

terryhendicott
21-Topaz II
Sep 10, 2023 12:15 AM UTC

Hi,

I have changed the coordinates a, b ,c into column vectors then you only need to index their position once.

Note index starts at zero by default.

Changed function to use the two elements of a vector x

Capture.JPG

Cheers

Terry

Translate
ttokoro
21-Topaz I
Sep 10, 2023 1:48 AM UTC

image.pngimage.pngimage.pngimage.pngAns=b.

Translate
t.t.
terryhendicott
21-Topaz II
Sep 10, 2023 3:37 AM UTC
Werner_E
25-Diamond I
Sep 10, 2023 2:03 PM UTC

In Prime a vector only is a column vector and you need just one index to specify one of its components.

row vectors are considered 1 x n matrices.

 

But of course you may define your points in the form of row vectors. You simply need to adopt the calculations accordingly or you could always use the transpose operator to turn a row vector into a column vector.

 

Here are my two cents

Werner_E_0-1694357317195.png

 

Werner_E_0-1694356876186.png

 

Prime 9 worksheet attached

 

 

Translate
ttokoro
21-Topaz I
Sep 11, 2023 3:50 AM UTC

The one of 3D. Max is A.
image.pngimage.png

image.png

Translate
t.t.
ttokoro
21-Topaz I
Sep 11, 2023 12:27 PM UTC

With grid mesh.

image.pngimage.pngimage.png

Translate
t.t.