📅  最后修改于: 2022-03-11 14:44:53.343000             🧑  作者: Mango
str = {strcat('z = ' , num2str(z))} % at the end of first loop, z being loop output
str = [str , strcat('z = ' , num2str(z))] % after 2nd loop
% plot your data
legend(str{:})