the s21 parameter extract from the user s-matrix


dear everyone
now I want to do a sweep in the Mode.I set the sweep parameter the w_taper_rib and set the result wanted to get the user s-matrix,which as show below

Now I want to get the plot about the relationship between the w_taper_rib and abs(s21)^2,how to write the script to get the plot.Can anyone help me solve the problem.Thanks a lot.MMI_tapered_test.lms (421.8 KB)


How about trying this script?

get propagation sweep result

S = getemesweep(‘S’);

plot S21 vs group span

s21 = S.s21;
group_span = S.group_span_2;

For more explanation, check this KB page:


dear aya_zaki
That’s not the answer what I want.because the script you used is in the EME propagation sweep settings in the EME annalysis window,as show below

however,in my simulation,I build a sweep in the optimizations and sweeps window(as show below).I have tried the script as you said ,but I can’t get the answer I wanted.


dear all
can anyone give me a help to slove the question above.Thanks a lot


Hi @jbwei,

Please try the following script lines. You will need to run the sweep first and then run the script to get the result and plot it.

wRib = getsweepdata("w_taper_rib_sweep", "w_taper_rib");
sMatrix = getsweepdata("w_taper_rib_sweep", "s-matrix");
s21Matrix = matrix(length(wRib),1);

for (ii = 1:length(wRib)) {
    s21Matrix(ii) = sMatrix(2,1,ii);
    #s21Matrix(ii) = abs(s21Matrix(ii))^2;

plot(wRib*1e6, abs(s21Matrix)^2, "w (micron)", "abs(S21)^2");

I hope this could help :slight_smile:


dear gwang
Thanks very much for your help.This is the answer what I want.:grinning: