MATLAB: Severe problems opening files with Matlab 2018a

MATLABsevere error/but in 2018a

When I try to open a file in Matlab 2018a, I get the following error:
>> open check_adc_vs_fir_samples.m
Error using open (line 146)
PATTERN must be a string scalar or character vector.
Cannot open file using dialog box either, I get same error message popping up as error dialog.
I'm an expert user of Matlab over 15 years, this is the first version of Matlab that I've seen this error. Normally I'm able to debug but can't resolve this on my own. Need Mathworks support.

Best Answer

I figured out the problem. I had made my own function for "contains.m" because I was using older Matlab versions (e.g. 2015b) that didn't have this function implemented. My version of this function was confusing Matlab 2018a obviously. If I remove my version of contains.m from the path, then Matlab 2018a works correctly. Thank you.
Related Question