Guys, I've been reading more on the forums, and the only possible solution is one that is posted by this user back in 2016, but I have absolutely no idea to make it happen:
"Hence you may go for using 'system objects' in a 'MATLAB system' block instead of MATLAB function block. Use 'interpreted execution' mode for the system block."
Would someone please explain to me (basically like tablespoon feed) the entire process for me? I have never used classref in MATLAB before, as I've never needed one. I want to create a variable of this class, and initialize it, so that I can resolve the issue with the mxArray error, but I've no clue how to do that. If necessary, I can upload the code as is (though I understand that this is not a desirable thing to do).