Place the function diproticbuffer in diproticbuffer.m and then the other code in solvediproticbuffer.m as specified in artical.
In the diproticbuffer function, you have a typo with c0 that it not in the original code.
Also remove the ‘source’ line from solvediproticbuffer.m
Running solvediproticbuffer should then work.
CLICK HERE to find out more related problems solutions.