필터 지우기
필터 지우기

S-function 2 dimension Dwork?

조회 수: 4 (최근 30일)
alex pabouctsidis
alex pabouctsidis 2013년 5월 20일
댓글: Nshine 2020년 2월 12일
Hello,
I'm coding a state estimator (EKF) using an matlab coded s-function, and need to store the state and covariance matrix at each time step.
Is it possible to set the Dwork to a 2 dimensional matrix? If so, how? If not, are there any other alternative methods to store the covariance matrix after each step?
Thanks, Alex

채택된 답변

Kaustubha Govind
Kaustubha Govind 2013년 5월 20일
No, AFAIK, S-function DWorks can only be vectors (1-D). Why not simply reshape the matrix to a vector and vice versa?
  댓글 수: 1
Sepehr Ariaei
Sepehr Ariaei 2019년 4월 16일
Miss. Govind,
MATLAB should really develop this DWork vector for multi-dimensional approach. It has been 6 years since people commented this and still it's not possible to do it. If you please add this as a feature would come in handy in the future! I really needed this.

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

추가 답변 (1개)

Erwin Torreao Dassen
Erwin Torreao Dassen 2013년 9월 2일
Humm... I was also needing this. Elsewhere in Simulink when specifying dimensions one can use an array like [2 3] to specify a 2D (or even more) signal. This doesn't work for the Dwork vector. Nowhere in the documentation is this stated and the "dimensions" name for the dwork property is misleading. It would be very good to support multidimensional work vectors (feature request?). For now at least state this in the documentation.
Kind regards,
Erwin
  댓글 수: 1
Nshine
Nshine 2020년 2월 12일
I completely agree with this answer. The documentation is not clear, and in fact inconsisent with Matlab's typical use of 'dimension'. If it is stated somewhere, I havent been able to easily find it.

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by