Hi Arsat,
I understand that you're trying to figure out difference between plot of S parameters using the matchingnetwork function and through app.
Notice that when using the following command for calculating the S parameters, the load impedance information is not being transferred to the sparameter function.
s = sparameters(n,freq,RefZ0,ckt_no)
Consequently, the default value is utilized, and any user-defined values specified during the design of the matching network is ignored. Refer to: Calculate S-parameters for RF data, network, circuit, and matching network objects - MATLAB sparameters (mathworks.com)
As a result, it is recommended to utilize the following command directly without defining the s-parameters:
rfplot(n,freq,1)
This will give you the following result which matches with one produced by Matching Network Designer app.
Also, ensure that the component property aligns with the topologies mentioned in the configuration tab of the application, such as 'L', 'Tee', or 3.
For additional guidance on utilizing the rfplot function, please refer to the associated documentation: