I'm sure there is such a limit in Matlab but it's nowhere near a vector length of 4884.
The problem is that you have at least 1 NaN value in your data.
Use the 'omitnan' flag to ignore NaN values.
To confirm that you have at least one NaN value in your data, if this next line returns True (1), you have NaN value(s).
And here's a test to confirm that Matlab can handle vector lengths of 4884 (or even 4884000 for that matter).