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
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) ?
回答(1 个)
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!