trackingKF code generation error: Inner dimensions must agree

조회 수: 5 (최근 30일)
Hien Nguyen
Hien Nguyen 2018년 1월 8일
답변: Trevor Roose 2018년 1월 10일
This is an extension to the question here. When I try to generate code, during the trial code generation I get the following in the trackingKF constructor: Inner dimensions must agree. Generated code for a general matrix multiplication at this call site. If this should have been a scalar times a variable-size matrix, the scalar input must be fixed-size.
All of my arguments to the constructor have a fixed size, and when I run my methods through matlab, which runs fine, the sizes match up. A: 8x8 double H: 4x8 double state: 8x1 double stateCov = 8x8 double MeasurementNoise = 4x4 double Q = 8x8 double Here is the constructor that code generation fails on: filter = trackingKF(... A, ... H, ... 'State', state, ... 'StateCovariance', stateCov, ... 'MeasurementNoise', Detection.MeasurementNoise, ... 'ProcessNoise', Q);
  댓글 수: 2
Elad Kivelevitch
Elad Kivelevitch 2018년 1월 8일
Hi Hien,
I just wanted to say that we are investigating the problem you are running into. If you can share your code with us, please do so. It will help with the investigation.
Thank you,
Elad
Hien Nguyen
Hien Nguyen 2018년 1월 9일
편집: Hien Nguyen 2018년 1월 9일
Here is a zip of my files with the code gen project in there. Thanks for looking into this.

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

채택된 답변

Trevor Roose
Trevor Roose 2018년 1월 10일
Hi Hien,
Thank you for reporting this problem. While the problem is still being investigated, one solution is to use trackingEKF instead of trackingKF. trackingEKF can be configured to behave exactly like trackingKF.
The attached zip file contains your code modified to use trackingEKF.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by