I would like to define several global variables (P1,P2,P3,…,Pn), where n is a number to be defined. I my first attempt was the following one:
for i = 1:n global strcat('P',num2str(i)) end
This does not work, what is the proper way to do this?
Best Answer