Signal from Workspace block

12 ビュー (過去 30 日間)
Yatender
Yatender 2024 年 4 月 5 日
回答済み: Anshuman 2024 年 10 月 28 日 5:48
While using signal from working block I am getting error like variable does not exist. But actually I am using it in my code even WORKSPACE showing vlalues also.

回答 (1 件)

Anshuman
Anshuman 2024 年 10 月 28 日 5:48
Hello,
Here are few things that you can check to troubleshoot this issue:
  • If you are using MATLAB functions, the workspace within a function is different from the base workspace. Variables in the base workspace are not automatically available in functions. Use "evalin" or "assignin" to access variables from the base workspace within a function if necessary.
  • If a variable is expected to be generated or modified by a block or function, ensure that this operation happens before you attempt to use it.
  • If using Simulink, try updating the diagram (Ctrl+D or the Update Diagram option) to refresh the model state and see if the error persists.
  • Additionally, make sure that all the relevant folders and subfolders have been added to the MATLAB path.
Hope it helps!

カテゴリ

Help Center および File ExchangeEvent Functions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by