diff --git a/+af_tools/xf2mat.m b/+af_tools/xf2mat.m index dfafffb354c712d6bfd946210636d080df708572..782cdba1174b8abf0a721cd76cdd831cad5f199a 100644 --- a/+af_tools/xf2mat.m +++ b/+af_tools/xf2mat.m @@ -122,6 +122,10 @@ function Polar = xf2mat(varargin) progName = 'XFOIL'; elseif ~isempty(tmpProgname) && strcmp(tmpProgname(1:5), 'xflr5') progName = 'XFLR5'; + elseif feof(fileID) + error('MATLAB:xf2mat:WrongInputFile', ... + ['The input file does not seems to be a valid XFOIL or XFLR5 results file.'... + ' Are you sure you loaded RESULTS files and not coordinate points?']); end end diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ce5962c7c17ea394d259563784577b1380e4152..8ef1d756fa34300960c1ae43af13d9c4318894ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- **xf2mat**: add error when input is not a proper xfoil/xflr5 result + - **plotpolar**: fix issue when unavailable data ## [4.0.0] - 2022-06-09