Set emitter coefficient

Hi - I have a simple problem, but can’t solve it. I start the OpenWaterAnalytics/​EPANET-Matlab-Toolkit and upload an INP file, run it, results “r” are fine (see code below). I then try to change a parameter, such as the Emitter Coefficient for one emitter. The commands
“d.NodeEmitterCoeff = [values]” (or “d.setNodeEmitterCoeff” or “setNodeEmitterCoeff” or similarly “d.setLinkDiameter” etc)

doesn’t change the parameter (ie, results are same, parameter unchanged, see CODE below).

If I try “setNodeEmitterCoeff” I get the error message “Assignment not supported because the result of method ‘setNodeEmitterCoeff’ is a temporary value.”

what am I doing wrong, what’s the fix?

Thank you.

%=================== CODE ==========================

% =====read INP file
net = ‘net-test’;
netINP = strcat(net,’.inp’);

% ==== load EPANET and run hydraulic analysis
d = epanet(netINP);
d.setDemandModel(‘PDA’, 0,0.1,0.5);


d.NodeEmitterCoeff = [0 1000 0 0];


%================= END OF CODE ======================