Question: function Ltotal = calclift ( fun , n , w ) % calclift: Approximates the total lift over the entire wingspan using Simpson's 1 /
function Ltotal calcliftfun n w
calclift: Approximates the total lift over the entire wingspan using Simpson's rule.
Inputs:
fun function handle to the lift distribution function
n number of node points must be even
w wingspan of the aircraft
Output:
Ltotal total lift over the full span
Ensure the number of nodes is even, as required by Simpson's rule
if modn ~
errorNumber of node points must be even for Simpson's rule.;
end
Define the semispan
semispan w ;
Generate the y values for the node points
y linspace semispan, n ; n points define n subintervals
Evaluate the lift distribution function at the node points
Lvalues funy;
Apply Simpson's rule
h semispan n; width of each subinterval
Q h Lvalues sumLvalues::end sumLvalues::end Lvaluesend;
Calculate the total lift over the full span
Ltotal Q;
end
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
