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 view (last 30 days)
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

Answers (1)

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

Categories

Find more on Multidimensional Arrays in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!