필터 지우기
필터 지우기

How to tell if an object is an Uncertain state-space (USS) model?

조회 수: 4 (최근 30일)
John
John 2023년 4월 25일
댓글: John 2023년 4월 25일
I have a function that is overloaded, and takes both standard state space, and uncertain (uss) state space as inputs.
Since c2d() doesn't work for uss, i need to do a different process depending on which type I pass in.
How can I tell programatically if an object is an Uncertain state-space (USS) model, vs a normal state space model?
I tried isempty(), isfield(), etc, but none of these commands are accepted on both uss and normal state space objects.

채택된 답변

Paul
Paul 2023년 4월 25일
Looks like isuncertain can be used to query if the input is uncertain.
Also, there is a function isStateSpace that can handle the other part, though it might be undocumented.
p = ureal('p',1);
usys = tf(p,[1 p]);
usys
Uncertain continuous-time state-space model with 1 outputs, 1 inputs, 1 states. The model uncertainty consists of the following blocks: p: Uncertain real, nominal = 1, variability = [-1,1], 1 occurrences Type "usys.NominalValue" to see the nominal value and "usys.Uncertainty" to interact with the uncertain elements.
isuncertain(usys)
ans = logical
1
isStateSpace(usys)
ans = logical
1
  댓글 수: 1
John
John 2023년 4월 25일
Ah, great. Thanks @Paul, that solves it. I searched the documentation but didn't find this. Still not sure how else to find this type of thing in the future :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Uncertain Models에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by