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 an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Trying to multiply and take square root of matrices

TS_9873223
4-Participant

Trying to multiply and take square root of matrices

I'm pretty new to Mathcad like today new, and all I'm trying to do is multiply and take the square root of a bunch of values in matrices but I can't get it to work for the life of me. I've attached a screenshot. My project consists of plotting a bunch of bending moments and shear force diagrams so I have two matrices from two plots with about 500 rows of values and just want to do a simple calculation to get another matrix output that I can take the maximum value from. Any help would be greatly appreciated. Ive also attached the file below in case anyone needs that. 

TS_9873223_0-1616132821821.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

Trust your having a good time with mathcad.

a) There is a difference between a vector of values "x" and a range variable "i" that references each individual element of "x".

Capture.JPG

b) There is a difference between a definition of a function Mz(x) in terms of x and an evaluation of the function many times using "x" the vector at each index "i".

Capture2.JPG

c) You use the vectorise method to work on vectors and matrices.  It is found on the ribbon at Math | Operators | Vector and Matrices in the bottom right hand corner is a capital V with an arrow over it.  You highlight the equation or part of equation required then select the operator.  You only need one vectorisation over the whole equation to get the right values.

Capture3.JPG

d} I have enclosed reworked worksheet.

 

Cheers

Terry

View solution in original post

6 REPLIES 6
-MFra-
21-Topaz II
(To:TS_9873223)

TS_98... answer.jpg

Hi,

Mathcad works from left to right and top to bottom in calculating results.

Placement of items is therefore important.

In your worksheet and the one I posted I have noticed an error is bought in by this mechanism.

You have defined the moment function as a integration of the associated vector calculation of the program and place the definition of moment function above the bottom of the V calculation.  This means M uses the previous definition of V not the one beside it.

Correction enclosed.

Hi,

Trust your having a good time with mathcad.

a) There is a difference between a vector of values "x" and a range variable "i" that references each individual element of "x".

Capture.JPG

b) There is a difference between a definition of a function Mz(x) in terms of x and an evaluation of the function many times using "x" the vector at each index "i".

Capture2.JPG

c) You use the vectorise method to work on vectors and matrices.  It is found on the ribbon at Math | Operators | Vector and Matrices in the bottom right hand corner is a capital V with an arrow over it.  You highlight the equation or part of equation required then select the operator.  You only need one vectorisation over the whole equation to get the right values.

Capture3.JPG

d} I have enclosed reworked worksheet.

 

Cheers

Terry

Thank you this solved all my problems I was running into!! I really appreciate all the help and work you did! I am new to this community and forum so I believe I accidentally accepted the wrong answer for this question, if you know how to reverse that please let me know so I can mark this as the solution!!!

LucMeekes
23-Emerald III
(To:TS_9873223)

Go back and accept your best answer as solution.

 

Success!
Luc

-MFra-
21-Topaz II
(To:TS_9873223)

TS_98... answer.jpg

the last question, ie d), is unanswered.

Top Tags