Could you help me interpret what happened?

Greetings,
I am debugging others' codes. In Polyhedron.m file row 521, it is a sentence:
if isempty(obj.He_int), obj.He_int = zeros(0,d+1); end
I found before this sentence was executed, obj.V was not defined as:
But after this sentence was executed, obj.V was calculated and got a matrix:
As you see, the sentence did not call obj.V directly but it did change obj.V. Could you explain to me what happened here? And how can I find the codes that changed obj.V. I think that is the bug I am looking for.
Related source codes are attached.
Thank you!

 Accepted Answer

Matt J
Matt J on 14 Dec 2020
Edited: Matt J on 14 Dec 2020
obj.V is a Dependent property.

5 Comments

Xin Shen
Xin Shen on 14 Dec 2020
Edited: Xin Shen on 14 Dec 2020
Thank you, Matt.
Yes, obj.V is denpendent property. So I add breakpoint inside function get.V. But get.V function is never been called in Polyhedron.m file row 521, how does it determine obj.V and how can I change the way to determine obj.V?
No, there is no reason it would be called in row 521 because V is not accessed there. It is accessed only later, when you try to display V in the variable editor.
Thank you, Sir!
That means I need to revisit get.V function to understand how it calculate obj.V and why obj.V needs He_int. Am I right?
Yes, I would imagine.
Thank you very much, wish I can find the bug!

Sign in to comment.

More Answers (0)

Categories

Products

Release

R2018a

Asked:

on 14 Dec 2020

Commented:

on 14 Dec 2020

Community Treasure Hunt

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

Start Hunting!