how to calculate the x coordinate if you don’t have chord length but have the percent position of the point from the leading edge, the percent c above the chordd in matlab

If we know the percentage of the chord where the point of interest is located and the distance above the chord line at that point, we can calculate the x-coordinate using the following formula:

main.m
x = c * (0.5 - percent_position)
33 chars
2 lines

where c is the chord length and percent_position is the percentage of the chord where the point of interest is located. The 0.5 represents the midpoint of the chord, which is the reference point for this calculation.

Here's an example implementation in MATLAB:

main.m
c = 10; % chord length
percent_position = 0.25; % point located 25% down the chord
percent_c = 0.1; % point located 10% above the chord

x = c * (0.5 - percent_position);
y = c * percent_c;

fprintf('(%f, %f)', x, y);
218 chars
9 lines

This would output (1.250000, 1.000000) for the given inputs.

related categories

gistlibby LogSnag