我有图像和矢量
a = imread('Lena.tiff');
v = [0,2,5,8,10,12,15,20,25];
还有这个 M 文件
function y = Funks(I, gama, c)
[m n] = size(I);
for i=1:m
for j=1:n
J(i, j) = (I(i, j) ^ gama) * c;
end
end
y = J;
imshow(y);
当我尝试这样做时:
f = Funks(a,v,2)
我收到此错误:
??? Error using ==> mpower
Integers can only be combined with integers of the same class, or scalar doubles.
Error in ==> Funks at 5
J(i, j) = (I(i, j) ^ gama) * c;
有人可以帮我吗?