Hi Can somebody help in interpolation ?

I have a parameter sweep results in file. And I want to use the sweep results to interpolate the phase value. I have script to calculate phase value using some formula. Now I want to get corresponding width value from the phase angle graph of the s-parameter (S12 angle value from parametric sweep results).

I would love to use spline interpolation. Probabily, the main problem is for loop. Because it is not similar to matlab. Its showing some error. So unable to move further. I found one for loop example on Lumerical webpage, but for my case, its showing error.

for(i=1:100) {

for(j=1:100) {

x(i,j) = i^2+j;

?x;

}

}

When, I am using its showing error.

Square_Si.lsf (1.0 KB)

Square_Si.fsp (300.2 KB)