필터 지우기
필터 지우기

error setting gram()

조회 수: 2 (최근 30일)
Gabriel Silva
Gabriel Silva 2023년 10월 3일
답변: Jon 2023년 10월 3일
I'm trying to use gram() over a finite time interval. I have this simple function:
function q = MatrizW_V2(A,B,t)
sys = ss(A,B,[1 0;0 1],[0 0;0 0]);
opt = gramOptions('TimeInterval',[0 t]);
Wc = gram(sys,'c',opt);
q = Wc;
end
My inputs are the attached matrix A1, B1, ant t around 1e-9 to 1e-8.
I'm getting the error:
The "TimeIntervals" option of the "gram" command must be set to a two-column matrix where each row is
valid interval.
But I think it is set in the wrigth way, isn't?
  댓글 수: 1
Jon
Jon 2023년 10월 3일
Please provide an example script that calls this function that reproduces the error

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

답변 (1개)

Jon
Jon 2023년 10월 3일
It is most likely that the value for t that you are passing to this function is not a scalar. It must be a scalar for [0 t] to be a two column matrix.

카테고리

Help CenterFile Exchange에서 Matrix Computations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by