Simulink Design Verifier Problem

4 ビュー (過去 30 日間)
Mohammad
Mohammad 2022 年 12 月 26 日
回答済み: Yatharth 2023 年 9 月 1 日
if trackID>0
mioState = confirmedTracks.Tracks(trackID).State;
else
mioState = inf(numStates,1,'like',confirmedTracks.Tracks(1).State);
end
while i'm doing the simulink design verifier for ACC model i'm getting this error in "find lead car" function
in this i have used inf(infinite array)
Non-finite number is used. Simulink Design Verifier does not support non-finite numbers. Function 'Tracking and Sensor Fusion/Find Lead Car' (#1689.1857.1912), line 48, column 16
can someone solve this error?

回答 (1 件)

Yatharth
Yatharth 2023 年 9 月 1 日
Hi Mohammad, I understand that you are encountering the error , "Non-finite number is used" in Simulink Design Verifier.
To resolve this error, you can modify your code to use a large finite number instead of "inf". Here's an example of how you can modify the code snippet you provided:
if trackID > 0
mioState = confirmedTracks.Tracks(trackID).State;
else
mioState = ones(numStates, 1) * 1e10; % Use a large finite number instead of inf
end
I hope this helps.

カテゴリ

Help Center および File ExchangeSimulink Design Verifier についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by