I understood that you want to
1) plot every row of matrix C against matrix B
2) And label every row of matrix C individually using legend
This can be achieved by DisplayName property of the plot as shown below
C = zeros(size(A,2),size(B,2));
C(i,j) = power(A(i),B(j));
plot(B,C(i,:), 'DisplayName', "row - "+num2str(i));
Refer to this for more information.