I have a class object QG initialised as gr = QG(constructor). It has a public property gr.spectrum which is initialised to  at the start. I dont know if this is necessary, but I create a set method for spectrum, and set gr.spectrum = A_Vector externally (that is the value is set using the method set.spectrum(argument)).
Then there is a method function of gr.doesSomething that does some stuff and within the method, according to an if statement, the method imperatively needs to update the property QG.spectrum within, and the updated property has to be accessed after the if statement by declarations in the method.
I check that the property QG.spectrum (as it is declared in the method making use of the property) has indeed updated in the method by printing out the new size of the property, and the latter always suggests it has. The trouble is that, if I then call gr.spectrum externally on the matlab workspace, it returns the non updated vector, and some of the other methods that rely on the updated vector do not seem to work because the sizes are not consitent. What is going on? Why is the property vector not really updated?