Hi, I am trying this in m file but there is an error occurring as "Incomplete or misformed expression or statement." where is the problem? X=[-1 -0.4423 -0.3 -0.4000 -0.3258 -0.3636 -0.3418]; for i= 1:3 N(i+2) = (7.8)*(X(i)+ 3*(X(i+1)+6*X(i+2)+1

1 次查看(过去 30 天)
Hi, I am trying this in m file but there is an error occurring as "Incomplete or misformed expression or statement." where is the problem?
X=[-1 -0.4423 -0.3 -0.4000 -0.3258 -0.3636 -0.3418];
for i= 1:3
N(i+2) = (7.8) * (X(i) + 3* (X(i+1) + 6 * X(i+2) + 16 * X(i+3) + X(i+4));
end

回答(1 个)

Torsten
Torsten 2016-3-3
Remove the parenthesis in
3*(X
Best wishes
Torsten.

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by