MATLAB: How to remove this error

error

I have written this code but when I run it it gives error.
center = rms(20,30,20);
center2(:,:) = center(:,1,:);
for i=1:1:222
for j=1:1:260
B1p(i,j) = 0.5*((x(i,j)+(sqrt(-1)*x(i,j)))+sqrt(-1)*(y(i,j)+(sqrt(-1)*y(i,j))));
B1n(i,j) = 0.5*(conj(((x(i,j)+(sqrt(-1)*x(i,j)))-sqrt(-1)*(y(i,j)+(sqrt(-1)*y(i,j)))))) / sqrt(-1) ;
end
end
for m=1:1:222
for n=1:1:260
if center2(m,n)==0
mapB1p(m,n)=0;
mapB1n(m,n)=0;
else
mapB1p(m,n)=B1p(m,n);
mapB1n(m,n)=B1n(m,n);
end
end
end
% clims = [min(min(B1p)) max(max(B1p))];
figure, imagesc(abs(B1p));
colormap jet;
It generates the following error:
Error using rms
Too many input arguments.
Error in OpenFiles (line 41)
center = rms(20,30,20);
What does this error mean? and how to remove this error?
Any help in the optimization of this code is appreciated.
Also, I have another question:
If I want to find out the rms of x and store it in another variable y. Then, how to write this code.
x=databx;
y = rms_x(:,30,:);
Is this code correct?

Best Answer

Look at the help for RMS:
rms
Root-mean-square levelexpand all in page
Syntax
Y = rms(X)
Y = rms(X,DIM)
Do you see anywhere there where it allows for 3 input arguments like you're trying?