MATLAB: How to raise a decimal numbers as power of A?

digital image processingMATLABMATLAB and Simulink Student Suite

Hello everyone..I am trying to raise decimal values which is ranging from(0.1:0.01:1) to the power of A(3×3 matrix).(eg.. A^[0.1:0.01:1]). I cannot find my answer anywhere.can anyone help me out..Thanks in advance..

Best Answer

If you want to do the element-wise exponential operation, the following will work on R2016b and onward versions
B = A.^reshape((0:0.1:1),1,1,[]);
For matrix exponentiation
B = arrayfun(@(k) {A^k}, 0:0.1:1)