www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/PowersOfMatrixElementsExample.m
%% Powers of Matrix Elements % Create a 3-by-3 matrix with the same value in each element. X = -2*ones(3,3) %% % Compute a 3-by-3 matrix of integer values. Y = pascal(3) %% % Compute the element-wise powers of the elements in |X| corresponding to % the exponents defined in |Y|. Z = realpow(X,Y)