Convert a table of S param to Z param

5 views (last 30 days)
I have text file which has freq and s21 value(In cartesian form and polar form ).
Need a help in convertering those S-paramteres to Z- parameters
I tried to use s2z command, but i doesn't work in this.
Could any one please help me resolve the problem?

Accepted Answer

William Rose
William Rose on 17 Jan 2022
How do you know s2z does not work? Do you get an error message, and if so, what?
The input to s2z must be complex numbers, in the form Re + i*Im. The file you provided has a header line and three columns: frequency, real part, imaginary part. It uses two different separators: tab and comma. That is annoying because it complicates the reading in of the data.
I assume that the data is in real, imaginary format. Change it to complex:
Then use s2z.
William Rose
William Rose on 21 Jan 2022
@Venkatkumar M, I don;t know why you get an error. The error message suggests Matlab is not finding the function renamevars(). renamevars is art of basic Matlab - nt some Toolbox. Therefore it should work.
Did renamevars get overwritten by accident? Try "clear renamevars" to address this possibility, then try your code again.

Sign in to comment.

More Answers (0)


Find more on Simulink PLC Coder in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by