What could be the solution of this error (Parse error ar'(':usage might be invalid MATLAB syntax)?

14 次查看(过去 30 天)
I have the following error that is appearing in my work in %time domain
%time domain
1-tmin=0;
2-tmax=200;
3-dt1= ((2*D)/(U^2))-(deltax/U);
4-deltat=0.8*min([0.1,dt1]);
5-if deltat<0.01
6-deltat=0.01;
end
Line 6 deltat = 0.01;
the error is (Parse error ar'(':usage might be invalid MATLAB syntax).
  3 个评论

请先登录,再进行评论。

回答(1 个)

Manikanta Aditya
Manikanta Aditya 2024-4-30
编辑:Manikanta Aditya 2024-4-30
The error message you’re seeing is typically due to a syntax error in your MATLAB code. In your case, the error message is “Parse error at ‘(’: usage might be invalid MATLAB syntax”. This suggests that there might be an issue with the use of parentheses in your code.
Check this code:
D = 1;
U = 1;
deltax = 1;
tmin=0;
tmax=200;
dt1= ((2*D)/(U^2))-(deltax/U);
deltat=0.8*min([0.1,dt1]);
if deltat<0.01
deltat=0.01;
end
Hope this helps.
  5 个评论

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by