Unfortunately there is no automatic way of doing it. Each ~ can be replaced by a dummy variable name. Something like "dummy" or "temp" might work (assuming you never use dummy/temp as a meaningful variable).
What you want to do is replace
function [x,y,z] = myfun(a,~,c)
with
function [x,y,z] = myfun(a,dummy,c)
and outputs
with
[x,dummy,z] = myfun(a,b,c);
DO NOT JUST DO A GLOBAL FIND REPLACE for ~, since ~= and ~x means something different and cannot become dummy= and dummyx.
Best Answer