diff --git a/+af_tools/extendpolar.m b/+af_tools/extendpolar.m index d930dc27d221e643d936096269db537d17b6bebb..74cb50b57aea9276bc9c0777703c7494f7ff91cc 100644 --- a/+af_tools/extendpolar.m +++ b/+af_tools/extendpolar.m @@ -96,7 +96,7 @@ if sign(min(alpha(:,1))) == sign(max(alpha(:,1))) end try - findstall(alpha, cl, cd) + findstall(alpha, cl, cd); catch error('MATLAB:extendpolar:noStall',['To be extended, a polar must at '... 'least contain the stall point.']); diff --git a/CHANGELOG.md b/CHANGELOG.md index 5244efa82217e191d14e46b8aef4cb4a7f088d5c..05ad16669418829589d95a0addd94b2ce4d0d797 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Initial release - ### Changed ### Deprecated @@ -20,3 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed ### Security + +## [1.0.0] - 2022-04-08 + +- Initial release + +[Unreleased]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v1.0.0...master +[1.0.0]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/releases/v1.0.0 diff --git a/tests/test_extendpolar.m b/tests/test_extendpolar.m index 1eebcb644e280097a2cf726369693f493670f1d5..0c8e5fc06680850bbf67c2f7dbaafa8c7af64894 100644 --- a/tests/test_extendpolar.m +++ b/tests/test_extendpolar.m @@ -192,3 +192,21 @@ end %% Test if function returns expected outputs +function test_correctAlphaSize(testCase) +% Verify if the output alpha has the correct size +% Should not re-expand polar that already covers the full range + +Polar = dummysinglepolar(); +stepAlpha = min(diff(Polar.alpha)); +fullRange = (-pi:stepAlpha:pi)'; + +[alphaExt, clExt, cdExt] = af_tools.extendpolar(Polar); +[alphaExt2, clExt2, cdExt2] = af_tools.extendpolar(alphaExt, clExt, cdExt); + +verifyEqual(testCase, alphaExt, fullRange, 'AbsTol',1e-9); + +verifyEqual(testCase, alphaExt2, alphaExt); +verifyEqual(testCase, clExt2, clExt); +verifyEqual(testCase, cdExt2, cdExt); + +end