Why do I get an error "Expected signal input to be finite" when using wlanPacketDetect?
Show older comments
I am using the WLAN toolbox to perform a packet recovery procedure on a custom generated waveform. When I try to detect the packet, I receive the following error:
Error using wlanPacketDetect
Expected signal input to be finite.
How can I fix this error?
Accepted Answer
More Answers (1)
Shoumei
on 20 Aug 2025
If there is a division operation beforehand, there is a possibility that NaN or Inf will be unintentionally input, and it is difficult to avoid this.
It is recommended to add a MATLAB function before the function/block where the error occurs, and replace NaN and Inf as shown below.

function y = fcn(u)
if isnan(u)
y = 0;
elseif isinf(u)
y = realmax('double'); % When input is single, realmax('single');
else
y = u;
end
This issue also occurs in Vision HDL Toolbox functions/blocks and degrades the user experience.
Instead of stopping the simulation, MATLAB/Simulink should continue the simulation with a warning.
For Japanese search
エラー:シミュレーション中にエラーが発生したため、シミュレーションを終了しました
原因:
'updateImpl' メソッドの実行中に、MATLAB System ブロック 'xxxx' 内の System object 'xxxx' で実行時のエラーが発生しました。
input data は有限にする必要があります。
Error in xxxx.p
Categories
Find more on WLAN Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!