MATLAB: Error undefined key word key

arnold transformcat maperrorinverse arnold transform

for i =0:255
s(i+1)=i;
end
j=0;
for i=0:255
j=(j+s(i+1)+key(mod([i,8],256)));
s([(i+1),j])=s([j,(i+1)]);
end
while i am trying to execute this code i am getting the error undefined keyword key for double. please tell me the way to resolve it

Best Answer

I would be almost certain that the message is about undefined function key, not undefined keyword key. Are you expecting key to be a function or an array?