MATLAB: How to use for loop twice

for loop

error: for | Error: Expression or statement is incomplete or incorrect.
syms x
Fun = (sqrt(7.447.*(200-x).*(2.0720.*x-200.*sqrt(9.01)+sqrt(9.01.*200^2- 7.9810*200.*x))))/8;
h=1;
zi = 1:360;
x=0:h:200;
Fun1 = matlabFunction(Fun);
for i=1:(length(x)-1)
for
j=1:360
end
y1 = Fun1(x(i));
z1 = Fun1(x(i));
x2 = x(i)+h;
y2 = Fun1(x(i+1));
z2 = Fun1(x(i+1));
x3 = x(i)+h;
y3 = y2*cos((pi/180)*zi(j));
z3 = z2*sin((pi/180)*zi(j));
T1 = [0, y3-y2, z3-z2];
T2 = [x(i)-x(i+1), y1-y2, z1-z2];
Vec = cross(T1,T2);
deltal = sqrt((y2-y1)^2+h^2);
deltazi = sqrt(z3^2+(y2-y3)^2);
dA11 = deltal.*deltazi;
end
please help me

Best Answer

Look at this part of your code
for
j=1:360
end
It's not correct, and even it's corrected
for j=1:360
end
This doesn't mean anything, maybe what you want is this:
syms x
Fun = (sqrt(7.447.*(200-x).*(2.0720.*x-200.*sqrt(9.01)+sqrt(9.01.*200^2- 7.9810*200.*x))))/8;
h=1;
zi = 1:360;
x=0:h:200;
Fun1 = matlabFunction(Fun);
for i=1:(length(x)-1)
y1 = Fun1(x(i));
z1 = Fun1(x(i));
x2 = x(i)+h;
y2 = Fun1(x(i+1));
z2 = Fun1(x(i+1));
x3 = x(i)+h;
for j=1:360
y3 = y2*cos((pi/180)*zi(j));
z3 = z2*sin((pi/180)*zi(j));
T1 = [0, y3-y2, z3-z2];
T2 = [x(i)-x(i+1), y1-y2, z1-z2];
Vec = cross(T1,T2);
deltal = sqrt((y2-y1)^2+h^2);
deltazi = sqrt(z3^2+(y2-y3)^2);
dA11 = deltal.*deltazi;
end
end