Error in s2rlgc
14 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I think there is a bug in the s2rlgc code currently being distributed (or at least in 2018a). When you feed the function S parameters swept over frequency, the following error results:
Error in s2rlgc (line 129)
if any(isnan(R) || isnan(L) || isnan(G) || isnan(C))
I believe the intended effect of this line is properly obtained by changing it to:
if any(isnan(R)) || any(isnan(L)) || any(isnan(G)) || any(isnan(C))
since the || operator doesn't appear to work between arrays, nor automatically reduce the array of zeros to a single 0. By doing the any() first, then the || operator, the arrays are properly collapsed prior to the boolean operation.
0 comentarios
Respuestas (1)
Debraj Bhattacharjee
el 17 de Jun. de 2019
Editada: Debraj Bhattacharjee
el 17 de Jun. de 2019
This is a bug in MATLAB R2019a when more than one set of s-parameters is used.
However, to work around this issue please follow the steps given below:
1. Create a function named "s2rlgc_modified.m", in which the line corrsponding to:
if any(isnan(R) || isnan(L) || isnan(G) || isnan(C))
is replaced with:
if any(isnan(R) | isnan(L) | isnan(G) | isnan(C))
The rest of the function is identical to "s2rlgc".
2. Please call the "s2rlgc_modified" function instead of the "s2rlgc" function.
0 comentarios
Ver también
Categorías
Más información sobre Data Import and Network Parameters en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!