Error in s2rlgc
조회 수: 12 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Debraj Bhattacharjee
2019년 6월 17일
편집: Debraj Bhattacharjee
2019년 6월 17일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import and Network Parameters에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!