Question: solve it as a matlab code pls The Drag ( FD ) and Lift ( FL ) forces of an aircraft can be estimated by
solve it as a matlab code pls
The Drag FD and Lift FL forces of an aircraft can be estimated by the following formulas: ; is the air speed ms is the wing span m is the air density kg m and are the drag and lift coefficients. Both and depend on angle of attack and have the following correlations: Where is in degrees For kg m S m V values ranging from to values ranging from to ; you are required to produce, exactly, the same following plot by completing the below MATLAB code. The main program contains all necessary input parameters then the above plot is created after calling two script subfunctions. The first function, called FDFL has two inputs V and should returns the drag and lift forces FD FL The second function, called CDCL has one input and returns two outputs, the coefficients CD CL Main program. Hint : write all given commands excluding the commented lines then complete missing! clear; clc; format short g Define the global variables Define the constant parameters: density, wing span, and the attack angles. rho;;alpha;;; Define the parameters with a range of values V and alpha ; ; Call the function FDFL to calculate the drag and lift forces at different attack angles FDFLFDFLalphaV; drag and lift for alpha; drag and lift for alpha; drag and lift for alpha Call the function CDCL to calculate the drag and lift coefficients ; Start the subplotting first subplot Drag forces subplot Define labels and legend of the first subplot second subplot Lift forces subplot Define labels and legend of the second subplot Third subplot Drag and Lift coefficients subplot Define labels and legend of the third subplot add the second axis and plot for CL yyaxis define the label and legend subfunctions define the function FDFL function FDFL global call the function CDCL to calculate the drag and lift coefficients ; Calculate the drag and lift forces ; ; End define the function CDCL function CDCL Calculate the drag and lift coefficient ;
