1. Why does my code work for double but not ExtendDouble?
The ExtendDouble example is old. It's subsasgn() method was not written to properly handle the newer property initialization features. The following modification will fix the issue.
newd = subsasgn(double(obj),s(1),double(b));
obj = ExtendDouble(newd,b.DataString);
2. Why is it even trying to use the default value at all, when I’ve explicitly provided the value as an input argument to the constructor?
Constructor functions have special behavior. Within them, an initial version of the output object "self" gets created with default values as soon as the constructor workspace is entered. Therefore, anything you do to self in the body of the testClass() constructor is simply modifying that initial object. It doesn't create it from scratch.
As a simple way to see this, you can test the following simpler class,
function self = myclass()
Running the constructor shows that self has been created in its workspace, even though I did nothing to put it there:
Name Size Bytes Class Attributes