I want to use ^ to call MatrixPower and Power correctly in my calculation. For example:
In[104]:= m={{0, -1, 0, 1/2}, {0, 0, -1, 1/2}, {-1, 0, 0, 1/2}, {0, 0, 0, 1}};
m^4
MatrixPower[m,4]
2^4
Out[105]= {{0, 1, 0, 1/16}, {0, 0, 1, 1/16}, {1, 0, 0, 1/16}, {0, 0,
0, 1}}
Out[106]= {{0, 1, 0, 0}, {0, 0, 1, 0}, {1, 0, 0, 0}, {0, 0, 0, 1}}
Out[107]= 16
I want m^4 is executed as MatrixPower[m,4] and 2^4 is executed as Power[2,4] automatically. Any tips for achieving this goal?
Regards,
Zhao