Global variable definition change in 2020a

조회 수: 5 (최근 30일)
Oz Kira
Oz Kira 2020년 10월 16일
댓글: Oz Kira 2020년 10월 16일
Hi
I am trying to run a model (not written by me). When I open it in 2019a matlab version I have a number of variables that are seen as global by matlab (change color). But when opening them in 2020a version these variables are not global. This is the same code in both cases. Did something changed in the global variable definition in 2020a?
Thanks for your answer
  댓글 수: 1
James Tursa
James Tursa 2020년 10월 16일
Please post a small example of your code that reproduces the issue.

댓글을 달려면 로그인하십시오.

채택된 답변

Steven Lord
Steven Lord 2020년 10월 16일
My suspicion is that you're not actually using global variables, you're using variables shared between a function and another function nested inside the first. There were some changes in release R2019b in this space; see the Release Notes for more information. My guess is that you were implicitly sharing those variables between the parent and nested functions.
  댓글 수: 1
Oz Kira
Oz Kira 2020년 10월 16일
Thank you. I think your suspicion was right. I tried looking for a global variables definition in the code but couldn't find any. Thank you for your help.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Whos에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by