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

Trying to multiply and take square root of matrices

SOLVED
TS_9873223
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

Re: Trying to multiply and take square root of matrices

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

Re: Trying to multiply and take square root of matrices

TS_98... answer.jpg

Re: Trying to multiply and take square root of matrices

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.

Re: Trying to multiply and take square root of matrices

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

Re: Trying to multiply and take square root of matrices

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!!!

Re: Trying to multiply and take square root of matrices

Go back and accept your best answer as solution.

 

Success!
Luc

Re: Trying to multiply and take square root of matrices

TS_98... answer.jpg

the last question, ie d), is unanswered.

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."