Trading Toolbox support for Interactive Brokers is limited to Windows only. This is clearly mentioned in thedocumented system requirements. On Mac & Linux you will see the error that you mentioned because these OSes don't support COM, on which the Trading Toolbox connector to IB is based (COM is a Windows-only technology).
To connect Matlab to IB on Mac/Linux, you can use the IB-Matlab toolbox:https://undocumentedmatlab.com/ib-matlab. IB-Matlab is based on IB's Java API (not COM), so it runs well on all platforms that support Matlab: Windows, Mac and Linux.
Which MATLAB version are you using? Try executing the following commands and then restart MATLAB.
restoredefaultpath % This will remove any custom paths
Also, make sure that the MATLAB version is same as the Trading Toolbox version, if they are not then try re-installing the latest version of the toolbox available for the installed MATLAB version.
ver % to check the version of the installed toolboxes
After you have done trying out the above suggestions, execute the following command. The output of this command should be the path of the default 'ibtws.m' file present in the Trading Toolbox directory folder.