Question: how do i get the exponential of diagonal matrix?

Hi, I have a diagonal matrix "B", which is for example [[2,0,0],[0,8,0],[0,0,4]]

I would like to have 1.5 to the power of each position in the diagonal matrix.

For example [[1.5^2,0,0],[0,1.5^8,0],[0,0,1.5^4]].

I try to write it as follows but fail :

Test 1
theta:=Matrix(3):
for j from 1 to 3 do
theta:=zip(`^`,(DiagonalMatrix(Vector(3,1.5))(j,j)),(B(j,j)))
end do:

Test 2
zip(`^`,1.5,B)

Please help. Thanks.

Please Wait...