Question: Matrix elementwise inversion

Hey all together,

this is my first question in this community and it is maybe a very simple one:

If I have a given matrix. How can I process individual elements with an mathmatical operation?

For example, I have a diagonal matrix and want to get a matrix in which every non-zero element is the square root of the inverse of its former element.

Has someone an idea?

Thank you very much!

Please Wait...