![]() value1) in the same Matlab expression is too complex for MCOS, and it does not properly understand it. Matlab does understand MainClass.inner to mean “the inner property of the MainClass class”, but adding another dereferencing level (. The underlying problem is that Matlab does not understand 1 to mean “the value1 property of the inner property of the MainClass class”. ![]() Understanding this oddity/bug then leads to a very simply workaround. It turns out that all these strange behaviors can be attributed to a single Matlab oddity (I call it a “bug”) in its class object system (MCOS) implementation. What the heck is going on here? did Matlab’s MCOS flip its lid somehow? Well, apparently not. value1 = 9 % one last attempt, that also fails! inner % strange - now we have both value1 & value2, but value1 is not updated! setInnerValue ( 7 ) % looks ok, no error. setInnerValue ( 7 ) % another strange run-time error! Reference to non-existent field 'setInnerValue'. ![]() inner % strange - value1 appears ok here, but where is value2 ?! value1 % strange - value1 appears unmodified! value2 % causes a strange run-time error! Reference to non-existent field 'value2'.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |