diff options
author | blendoit <blendoit@gmail.com> | 2019-09-30 18:42:34 -0700 |
---|---|---|
committer | blendoit <blendoit@gmail.com> | 2019-09-30 18:42:34 -0700 |
commit | 588c34a3d595fcad5e93b8d4893f1098ce64d046 (patch) | |
tree | 0afc8ab9588845080b46c31ce62b725d9de3f0a8 /wing_scripts/get_ds.m |
First commit!
Changed coordinate lists into numpy arrays.
Diffstat (limited to 'wing_scripts/get_ds.m')
-rw-r--r-- | wing_scripts/get_ds.m | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/wing_scripts/get_ds.m b/wing_scripts/get_ds.m new file mode 100644 index 0000000..2f0eb9d --- /dev/null +++ b/wing_scripts/get_ds.m @@ -0,0 +1,20 @@ +function ds = get_ds(xi,xf,u) + +dist = 0; +numSteps = 10; +dx = (xf-xi)/numSteps; +z0 = get_z(xi,u); +x0 = xi; +for i=1:10 + tempX = x0+dx; + if tempX > 0 + tempZ = get_z(tempX,u); + else + tempZ = 0; + end + dist = dist + (dx^2+(tempZ-z0)^2)^.5; + z0 = tempZ; + x0 = tempX; +end + +ds =dist;
\ No newline at end of file |