필터 지우기
필터 지우기

How do I acquire the states of 20 detections simultaneously using matlab function?

조회 수: 1 (최근 30일)
Hello, using cameras I am detecting vehicles and I have the measurement data in a nested struct in a bus. This data has the states of the vehicles in terms of [x,y,z,vx,vy,vz] and this data is in a 300x1 struct (Picture "struct") and in that struct is the measurement values of all 300 detections allowed but only 20 of the matrices are nonzero values, which are the only vehicles around my vehicle (20 vehicles). The states are in a double time series (Picture "double_timeseries") and comes in a 6x1 matrix (Picture "Data).
The function im using is in the (Picture "function") which comes after the Detection concatenation (Picture "model") block. The function works but only outputs zeros.
"struct"
"Double timeseries"
"Data"
"Function"
"Model"
  댓글 수: 2
Walter Roberson
Walter Roberson 2023년 9월 12일
Is Detections(i).Measurement something that can be multiplied by a double precision array (code), or is it something that has a field or property named Data (screen capture) ?
Marshall Botta
Marshall Botta 2023년 9월 12일
편집: Marshall Botta 2023년 9월 12일
Well Detection(i).Measurement is the double timeseries but opens up the common properties then i have to do Detections(1).Measurement.Data to actually get that data, in the matlab workspace specifically.
I am not familiar with double preicision array (code) but what it seems like, from the Matlab documents, a 1x1 struct.
But the Detection(1).Measurement comes in a 1x1 double time series and the data property is a 6x1x201 so if the double preicision array is a double array of 300x2. You couldnt multiply them from my knowledge of linear algebra.
If i understand your question correctly.
Thank you for the reponse!

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

답변 (1개)

Githin George
Githin George 2023년 10월 6일
Hello Marshall,
I would suggest using the debugging workflow for ‘MATLAB function block’ to clearly observe the input structure for ‘fcn’ function. Further, verify that the state values are updating correctly and are non-zero as expected during the simulation.
The following link describes debugging workflow for ‘MATLAB function block.
I hope this helps.

카테고리

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

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by