Error in code, parenthesis perceiving as comment for some reason

1 次查看(过去 30 天)
If a run the following code I get a following comment:
Line 17: A '(' might be missing a closing ')'.
causing invalid syntax at end of line. Line 17 is
Q_est = updateQ(...),
and this warning also shows in line 18 and 19 too. Does anyone know what is the problem? Here we cannot see it, but if I run this code in MATLAB the last parenthesis is shown in green and perceived as a comment for some reason.
for i = 1:numIterations
beta_est = updateBetaUsingCarterKohn(Y, X, alpha_est, beta_est, Q_est, R_est);
Q_est = updateQ(...)
R_est = updateR(...)
alpha_est = updateAlpha(...)
end

回答(1 个)

Stephen23
Stephen23 2024-4-28
移动:Matt J 2024-4-29
Explanation: for some reason you seem to be running this literal code:
Q_est = updateQ(...)
instead of calling UPDATEQ etc. with any inputs that they require. The reason why the closing parenthesis is green like a comment is because it is a comment: you defined it as a comment by using the ellipsis, exactly as explained in the documentation:
Solution: call the function with inputs, rather than with superfluous ellipses.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by