Simulating linear systems with nonuniform time vector

Hello,
I want to simulate a state-space model (A,B,C,D) of the kind generated by the ss command in the Control Toolbox, but with a non-uniformly spaced time vector. The lsim command does not work, since it requires evenly spaced time samples.
Would you be able to suggest a way of generating state- and output values for this case?
Thank you in advance!

 채택된 답변

Sam Chak
Sam Chak 2022년 6월 28일
I think you can possibly use the 1-D data interpolation technique, interp1() function at certain intervals of the query time points. For example
xq = interp1(t, x, tq, 'cubic')
For more info, please check other methods.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Mathematics에 대해 자세히 알아보기

제품

릴리스

R2021b

질문:

2022년 6월 28일

댓글:

2022년 6월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by