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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Mathcad Prime

Raj_mathcad
1-Visitor

Mathcad Prime

Prime Users,

Does Mathcad Prime has a built-in function to find the squareroot of a matrix?

I do not see one with my M14.

Thanks...

ACCEPTED SOLUTION

Accepted Solutions
RichardJ
19-Tanzanite
(To:AlanStevens)

Here's a very handy function that Alvaro posted some time ago. It allows you to apply any function to a matrix. In this case, the downside compared to the solve block approach is that you can't find different roots by changing the guess values.

View solution in original post

13 REPLIES 13

I see only 2 new built-in tools for an array in Mathcad Prime:

- return a row of a matrix

- return a norm of a vector/matrix

Sorry I think you must create/search an user tools for your task (A=S^2 - it is not a square root of the each element of A - see the attach) in Mathcad 14/15 and Mathcad Prime!

See http://communities.ptc.com/thread/33064

Raj sharma wrote:

Prime Users,

Does Mathcad Prime has a built-in function to find the squareroot of a matrix?

I do not see one with my M14.

Thanks...

Depends what sort of square root you mean - see attached.

Alan

Sorry,

but a matrix 2x2 is not a problem.

A problem is a matrix 3x3 and more.

Valery Ochkov wrote:

Sorry,

but a matrix 2x2 is not a problem.

A problem is a matrix 3x3 and more.

Yes, I just used the 2x2 as an example. See attached (in M11 format - though generated in M15) for more general n'th root of matrix function. It includes a 3x3 example!

Alan

RichardJ
19-Tanzanite
(To:AlanStevens)

Here's a very handy function that Alvaro posted some time ago. It allows you to apply any function to a matrix. In this case, the downside compared to the solve block approach is that you can't find different roots by changing the guess values.

Richard Jackson wrote:

Here's a very handy function that Alvaro posted some time ago. It allows you to apply any function to a matrix. In this case, the downside compared to the solve block approach is that you can't find different roots by changing the guess values.

Very elegant!

Alan

Here's a very handy function that Alvaro posted some time ago. It allows you to apply any function to a matrix.

Can it be used with the vector sum function?

Mike

Here's a very handy function that Alvaro posted some time ago. It allows you to apply any most functions to a matrix.

What would you expect a vector sum of a matrix to be?

Here's a very handy function that Alvaro posted some time ago. It allows you to apply any most functions to a matrix.

What would you expect a vector sum of a matrix to be?

Matrix sum

Mike

Thanks Alan, Richard and all..

I like the method using eigenvecs and eigenvals functions..

Raj sharma wrote:

Thanks Alan, Richard and all..

I like the method using eigenvecs and eigenvals functions..

And what about cholesky(M)?

Valery Ochkov wrote:

And what about cholesky(M)?

Only works for symmetric matrices.

Alan

ifomenko
15-Moonstone
(To:RichardJ)

Alvaro function gives wrong result in symbolic case because of symbolic bug.

Symbolic eigenvals error.png

To exclude this bug it`s necessary to use eigenvec() function instead of eigenvecs() to right mapping of eigenvalues and their corresponding eigenvectors

Right sqrtm function.png

Announcements

Top Tags