Info
此问题已关闭。 请重新打开它进行编辑或回答。
A for loop need help ASAP
1 次查看(过去 30 天)
显示 更早的评论
I have a loop and I want to collect the output?
A are arrays 0:300
for i = 0:3:300
Fi = atan(-(A5(1,1+i)/A5(1,2+i)));
Theta = acos(A5(1,3+i));
Psi = atan(A3(1,3+1)/A4(1,3+i));
end
1 个评论
回答(1 个)
Torsten
2019-4-30
编辑:Torsten
2019-4-30
for i = 0:3:300
j = i/3 + 1;
Fi(j)= atan(-(A5(1,1+i)/A5(1,2+i)));
Theta(j) = acos(A5(1,3+i));
Psi(j)= atan(A3(1,3+i)/A4(1,3+i));
end
2 个评论
Torsten
2019-4-30
j = 0;
for i = 0:3:300
j = j + 1;
Fi(j)= atan(-(A5(1,1+i)/A5(1,2+i)));
Theta(j) = acos(A5(1,3+i));
Psi(j)= atan(A3(1,3+i)/A4(1,3+i));
end
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!