Why do I get a "Failed to compute constant value for nontunable property" error while generating code using a MATLAB System Object?
I have a function that defines a "trackerGNN" system object and want to generate code for it
function [output] = trackerModule2(input, allTracks)
persistent GNN
save('Tracksave1.mat','input','allTracks');
if isempty(GNN)
GNN = trackerGNN('AssignmentThreshold',input.AssignmentThreshold,...
'MaxNumSensors', input.numSensors,...
'TrackLogic','Score',...
'ConfirmationThreshold', input.ConfirmationThreshold,...
'DeletionThreshold', input.DeletionThreshold,...
'DetectionProbability',input.DetectionProbability,...
'FalseAlarmRate', input.FalseAlarmRate,...
'Volume', input.Volume,...
'Beta',input.Beta); %Toolbox specific
end
...
end
However, when I try to generate code from the function, I receive the following error:
>> codegen trackerModule2.m -args {input, allTracks}??? Failed to compute constant value for nontunable property 'AssignmentThreshold'. In code generation, nontunable properties can
only be assigned constant values.
How can I resolve this error?
Accepted Answer
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!