Guilin Sun
Ansys Employee
You can sweep the specific thickness, eg d(2) in a loop. For example, in line 18, you can write
nj=9;
dd=linspace(1,5,nj)*1e-6;
for(jj=1,nj){
d(2)=dd(jj);
.....
}
You will need to revise your script, move all constants outside the loops, and define the matrix, such as density, purcell etc with dimension of frequency and thickness. Please try.