Question: This is for matlab: If I am looking at an airfoil dat file, how can I modify this code where both the X & Y
This is for matlab:
If I am looking at an airfoil dat file, how can I modify this code where both the X & Y coordinates go from 0 to 1?
function[TopX, TopY, BottomX, BottomY] = AssortingDatFile(finalM) % Should analyze the top and bottom arrays of the X & Y coordinates
TopX = [];
TopY = [];
BottomX = [];
BottomY = [];
for i = 1:length(finalM) % Goes through finalM made from initial function
if finalM (i,2) > 0 % Checks to see if negative
TopX = [TopX, finalM(i,1)]; % Top Array
TopY = [TopY, finalM(i,2)];
else
BottomX = [BottomX, finalM(i,1)]; % Bottom Array
BottomY = [BottomY, finalM(i,2)];
end
TopX=[TopX 0]
TopY=[TopY 0]
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
