####### Script to generate radial doping profile #### # Inputs ND = 1e19; # donor concentration; unit /cm^3. Use negative value for acceptors R = 0.05*1e-6; # inner radius; unit m P = 401; # number of points along x and y direction # rectangular grid x = linspace(-0.3,0.3,P)*1e-6; y = linspace(-0.3,0.3,P)*1e-6; z = linspace(-2,2,2)*1e-6; # one pont at the bottom and one at the top N = matrix(P,P,2); N(1:P,1:P,1:2) = ND * 1e6; # Set doping at all points to ND. Make unit /m^3 for (i=1:P) { for (j=1:P) { if (sqrt(x(i)^2+y(j)^2)