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 visualizzazione (ultimi 30 giorni)
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

Risposte (1)

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

Community Treasure Hunt

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

Start Hunting!

Translated by