필터 지우기
필터 지우기

Operands to the || and && operators must be convertible to logical scalar values

조회 수: 15 (최근 30일)
Udaya Kiran S
Udaya Kiran S 2023년 3월 29일
답변: Jack 2023년 3월 29일
controlSystemDesigner(tf(1,[1,1]))
Error using controlSystemDesigner
Operands to the logical AND (&&) and OR (||) operators must be convertible to logical scalar values. Use the ANY or ALL functions to reduce operands to logical scalar values.
what do i do to fix it

답변 (1개)

Jack
Jack 2023년 3월 29일
This error occurs because the input argument of the controlSystemDesigner function is not a valid transfer function object.
The tf function creates a transfer function object, but in your example, it is missing some required arguments. A valid transfer function object requires at least two arguments: the numerator coefficients and the denominator coefficients.
To fix this error, you need to provide both the numerator and denominator coefficients as arguments to the tf function. For example, to create a transfer function with numerator 1 and denominator [1,1], you should use:
sys = tf([1], [1, 1]);
controlSystemDesigner(sys)
This will create a transfer function object sys and open it in the controlSystemDesigner app.

카테고리

Help CenterFile Exchange에서 Create System Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by