SimBiology sensitivity analysis - "Complex values cannot be converted to logicals"
이전 댓글 표시
I have a PBPK model with the partition coefficients calculated using a mechanistic model. I have a MATLAB function that defines the partition coefficient as an initial assignment in the SimBiology model. This causes a problem when running a sensitivity analysis:
"Complex values cannot be converted to logicals"
Is there a way to overcome this or do I have to do a manual sensitivity analysis?
채택된 답변
추가 답변 (1개)
Walter Roberson
2017년 7월 29일
I would speculate that you have a comparison between two values, but one of the values has turned out to be complex. But possibly you have the equivalent of "if expression" with the implicit test "if expression ~= 0" but the expression turns out to be complex.
I am not sure what the debugging facilities available are, but I would recommend starting to trace back under the assumption that something become complex when you did not expect it to.
Sometimes expressions turn unexpected complex due to round-off error. For example if you have
sqrt(10*A - B)
and A is 1E45 and B is 1E44, then even though algebraically the two are the same, because of quantization and round-off, 10*A would be less than B, leading to sqrt() of a complex number.
댓글 수: 1
Arthur Goldsipe
2017년 7월 29일
I'll post a follow-up answer shortly, but the complex values are introduced by SimBioogy's sensitivity analysis and cannot be avoided when using this feature. You can find more details here.
커뮤니티
더 많은 답변 보기: SimBiology Community
카테고리
도움말 센터 및 File Exchange에서 Perform Sensitivity Analysis에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!