issue with displaying the changing values on scope block via MATLAB function block

2 ビュー (過去 30 日間)
Mehreen Khan
Mehreen Khan 2023 年 6 月 16 日
回答済み: Anush 2023 年 6 月 27 日
i have created a matlab function block with code for simulated annealing algorithm. the values of the temperature changes as required inside the block and are printed correctly while displaying. but when i connect that to scope block it shows a constant value. tried different solutions with creating array, cell array, persistent variable and storing the value to connect to output but still not getting the required results.

回答 (1 件)

Anush
Anush 2023 年 6 月 27 日
Hello Mehreen,
If you are experiencing issues with displaying the changing values of the temperature in a Simulink model while using a scope block, one of the following might work:
  1. Make sure the sample time and number of samples are appropriate for capturing and displaying the changing temperature values.
  2. Try changing the values of initial temperature and cooling rate to various values and see if the changes are getting reflected in the scope block.
  3. Try logging the signal immediately as it comes out of the block and check it in the data inpector.
  4. Make use of the workspace to check the values (You can also use 'To Workspace' block for the purpose).
  5. Ensure that the scope block is correctly configured to display the desired signals.
By following these suggestions and using them to your specific context, you should be able to resolve the issue

カテゴリ

Help Center および File ExchangeDiscrete-Event Simulation についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by