フィルターのクリア

Why is the same variable displayed colored and uncolored?

5 ビュー (過去 30 日間)
Pseudoscientist
Pseudoscientist 2020 年 7 月 21 日
コメント済み: Pseudoscientist 2020 年 7 月 21 日
The struct D is displayed with green color until it suddenly (row 562) loses its green color and things go wrong after that.
I have attached an image thats shows the described issue and the entire matlab code
This is a script from a functional magnetic resonance imaging reconstruction tool where I have removed the graphical user interface so that I may run it on a computation cluster that is a linux server
edit: I have also attached the version of the script where the GUI has not yet been removed
  2 件のコメント
Star Strider
Star Strider 2020 年 7 月 21 日
It loses its green colour because it is inside the ‘zo_pb_cb’ function. Functions have their own workspaces. Also, varargin does not result in any arguments being aubsequently assigned (at least in the code image). Those are the problems. You need to define the solutions.
I am not posting this as an Answer because it is not one. However it may lead you to a solution.
Pseudoscientist
Pseudoscientist 2020 年 7 月 21 日
thanks

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

採用された回答

Cris LaPierre
Cris LaPierre 2020 年 7 月 21 日
There is a warning associated with the blue D. Hover over it to see.
I suspect the issue is that you have accidentally included subfunctions inside the first function. I'm not familiar with your code, but perhaps try inserting the closing "end" for the function defined on line 1 at line 162. This removes any color difference from all instances of D.
I think you will also need to remove the "end" from what is now line 558. There appears to be an extra indent in this function, which may be causing visual confusion.

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by