What I wanted was the following:
for i=2:4
B(i)=B(1,i-1);
for j=2:11
A(1,j)=A(1,j-1);
A(2,j)=A(2,j-1):
y(i,j)=myfun(A(:,j),B(i));
end
end
figure
mesh(x(1,:)B,y)
surf(x(1,:)B,y)
But I did it. Thank you