Question: Write a MATLAB code The lift force L and the drag force D for a simple airfoil are correlated by L = A sin( D
Write a MATLAB code
The lift force L and the drag force D for a simple airfoil are correlated by
L = A sin( D + B ) exp( 0.01 D ),
where A and B are parameters.
Develop a MATLAB function that for input values of A and B
1. Sets an anonymous function LofD that returns L given D.
2. Generates an equally spaced test distribution Ddistr of 100 values of D between 0 and 3
3. Finds the maximum value of L ( Lmax ) and the corresponding value of D , ( D_Lmax )
4. Returns in order LofD , Ddistr, Lmax , D_Lmax
CODE:
function [LofD, Ddistr, Lmax, D_Lmax] = Problem_4 % Input % A: Lift Force Parameter % B: Lift Force Parameter % % Output % LofD: Anonymous function handle % Ddistr: Test distribution of drag values % Lmax: Maximum lift force % D_Lmax: Drag force for maximum lift
% write your function below (replacing the existing code) LofD= 0; Ddistr=0; Lmax=0; D_Lmax=0;
end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
