How to use the Sum function in this instance
显示 更早的评论
Hello, Ive been writing code for one of my modules and came across a formula that I dont understand how to put it in matlab, it is this equation below:

My problem is that I dont understand how to use the sum function in this instance
4 个评论
John D'Errico
2023-2-8
Is x known? Is z known? Is Ar known? What are they? Are they variables, constants? Symbolic? What?
Is the sum taken as 5:1:85? I find it strange that the sum does not go all the way down to 0 or up to 90, since this is clearly an angle, represented in degrees.
It is easer to help you if you tell us enough to know what form are the variables in that expression.
Ahmed Alzaabi
2023-2-8
Torsten
2023-2-8
Are you sure you included the correct code ?
And you didn't tell us about x and z.
So far I can see that if a = 0 as in your code, d_eps_alpha will also be 0.
Ahmed Alzaabi
2023-2-8
采纳的回答
更多回答(1 个)
Assuming all your variables (x,z,Ar, etc...) are scalars, then,
fi=5:85;
q1=0.5*cosd(fi).^2;
q2=q1+z^2;
q3=sqrt(x^2+q2);
d=(a/pi^2/Ar)*sum( (q1./q3).*( (x+q3)./q2 +x./(x^2+z^2) ) ) * pi/180
类别
在 帮助中心 和 File Exchange 中查找有关 Guidance, Navigation, and Control (GNC) 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
