Hii,
addchannel function is from older versions of MATLAB and is no longer supported .Instead you can use addinput function to add the channel and returns a channel object.
Refer to below information for more info
Transition Your Code to Session-Based Interface - MATLAB & Simulink (mathworks.com) - modify older coder to match with latest relase.
Hope this helps!