I want to write the function in the legend ,automtaic for exmaple :
n=0:10e3;f=(log2(n)).^2;c_gn=10*((log2(n)).^2);plot(n,f,n,c_gn);legend('(log2(n)).^2','10*((log2(n)).^2');
I want that in the leged to change aoutomtacli every time I change f or c_gn and not the expression of the vaule manually in the legend . how to do it ?
Best Answer