Bit Error Rate Analysis APP problems - AWGN variable getting deleted and output variable using out.varname

I am attempting to use the "Bit Error Rate Analysis" APP to do BER measurements of a simple 64psk system (from a text).
Symptoms:
  • When I run the montecarlo simulation with the simulink model, I can see the simulink window open, and the displayed error rate in a display box for each run of the AWGN SNR value. The result values seem reasonable. The "To Workspace" variable name connected to the BER results (error rate Calculation output) is grayBER, and displays on the simulink block diagram as such. However, when the app opens the simulink model the variable displays as out.grayBER.
  • In the model setup I have the single simulation output unchecked. The plot on the BER tool app just shows a flat line as if the simulation results were not read.
  • When I open the simulink model after running the BERtool motecarlo simulation, the simulink variable is again listed as just grayBER.
  • If I run the simulink model, I can see the "grayBER" variable in the Base Workspace
  • I can see the values of the grayBER variable in the matlab workspace
Another perhaps unrelated issue is that running the BERtool deletes the AWGN variable EbNo when the APP completes the montecarlo simulation run. I can watch the model explorer delete it when it finishes. Then when I manually open the simulink file, I get the warning that the variable has been deleted from the workspace.
My conclusions:
  • The Bit Error Rate Analysis APP is using a different model settings than what are used when I manually run it.
  • It appears that the Bit Error Rate Analysis APP is being a bit overzealous in cleaning up the variables it uses after running.
Are there settings somewhere that will fix these issues ?

2 件のコメント

evan
evan 2025 年 10 月 19 日
I updated to 2025b and the behavior is the same.
evan
evan 2025 年 10 月 21 日
I was able to find the issue. In the "To Workspace" variable the "Limit data points to last" needed to be set to 1 instead of the default "inf"
Note that the workspace variables are still being deleted by the simulation if you have the model open allready. This then prevents you from running the model standing alone even though the variables are defined in the PreLoadFcn callback. Is there a way to fix this ?

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeEvent Functions についてさらに検索

製品

リリース

R2025a

質問済み:

2025 年 10 月 19 日

コメント済み:

2025 年 10 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by