When I run the code below with the input code1([1 3 4]) I get an error that says too many input arguments. I made sure there are no other variables named code1. Any help?
function code2 = code1(z)z1 = 0;z2 = 0;z3 = 0;code2 = zeros(1,length(z));for i = 1:length(z) code2(i) = z(i) + 1;enddisp ('code2 =', code2)end
Best Answer