MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB数学相关] 运行错误提示看不明白 (https://www.labfans.com/bbs/showthread.php?t=9874)

qingchu 2009-10-12 17:31

运行错误提示看不明白
 
syms X
Z= 0.0349*X.^2-3.3671*X+77.2304;
K1=diff(Z);
K2=diff(K1);
p=(1+K1.^2).^(3/2)/abs(K2);求曲率半径
y=inline(sum(p.*[X.^2,X,1]));
[ymin,xmin]= fminsearch(@(x)y(x),0)% 这是求极值点的函数
运行出现错误
Error: "identifier" expected, "(" found.

请问如何改正?我是在matlab6.5中运行的,谢谢了

yhcode 2009-10-12 18:41

回复: 运行错误提示看不明白
 
( 的输入是不是在中文状态,单步运行一下,看在哪句出问题了

hilbertyuan 2009-10-12 19:54

回复: 运行错误提示看不明白
 
你的分号和()都是中文输入模式,换成英文的就好了,在m文件中显示为红色,那是错误的标志


所有时间均为北京时间。现在的时间是 13:28

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.