The error arises because the dimensions of C and f are not compatible for matrix multiplication. In MATLAB, when you use the * operator, the number of columns in C must equal the number of rows in f. If you intended to multiply the elements individually, you should use elementwise multiplication (.*) instead.
Double-check the sizes of your matrices inside the MATLAB Function block—ensure that C and f are defined with matching dimensions if you really want to use matrix multiplication. Also, note that the warning about the output not being fully set means you should explicitly assign the dimensions of your output variable, possibly by preallocating it or ensuring every code path sets it.
Follow me so you can message me anytime with future questions. If this helps, please accept the answer and upvote it as well.