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
0 个评论
回答(1 个)
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Quadratic Programming and Cone Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!