Error in code, parenthesis perceiving as comment for some reason
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Stephen23
am 28 Apr. 2024
Verschoben: Matt J
am 29 Apr. 2024
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 Kommentare
Siehe auch
Kategorien
Mehr zu Quadratic Programming and Cone Programming finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!