Say I have a MATLAB object defined in a class file
classdef foo properties bar end end
And I create a foo object
myfoo = foo();
Now I want to add another field to dynamic dynamic. I want
myfoo.newfield = 42;
but it will cause an error.
I know that there is a way to dynamically add a field / property to a MATLAB object, but I cannot remember it or easily find it in the help. Does anyone know the syntax?
source share