Modify the diameter of link

i want to set link diameter with “setLinkDiameter” but it is showing me unrecognized property.
no of diameter in network are 34 so i created a randam lot of 34 dia “x”.

" x = 50*randi([4,15],1,34);
d.setLinkDiameter = x;
Unrecognized property ‘setLinkDiameter’ for class ‘epanet’. "
plz help…

Hi @devangsingh,

You can try this example:

start_toolkit;
d=epanet('Net1.inp');

d.getLinkDiameter

diameters =  50*randi([4,15], 1, d.getLinkCount);
d.setLinkDiameter(diameters)

d.getLinkDiameter

d.unload; 

Also, you can see some examples when you type
>> help d.setLinkDiameter

Regards,
Marios

1 Like

thank you so much sir @Mariosmsk