Skip to content
Snippets Groups Projects
Verified Commit 214cd796 authored by Thomas Lambert's avatar Thomas Lambert :helicopter:
Browse files

fix(plotpol): issue when missing data

parent c654ccdb
No related branches found
No related tags found
No related merge requests found
......@@ -81,15 +81,15 @@ function plotpolars(varargin)
set(0, 'defaultTextInterpreter', 'latex'); % Default interpreter for all plots
plotsinglepolar(rad2deg(alpha), c_l, '$C_l - \alpha$', '$\alpha$ [deg]', '$C_l$ [-]');
plotsinglepolar(rad2deg(alpha), c_l, 'C_l - \alpha', '$\alpha$ [deg]', '$C_l$ [-]');
if nargin > 2 || nargin <= 1
plotsinglepolar(rad2deg(alpha), c_d, '$C_d - \alpha$', '$\alpha$ [deg]', '$C_d$ [-]');
plotsinglepolar(rad2deg(alpha), c_l ./ c_d, '$C_l/C_d - \alpha$', '$\alpha$ [deg]', ...
plotsinglepolar(rad2deg(alpha), c_d, 'C_d - \alpha', '$\alpha$ [deg]', '$C_d$ [-]');
plotsinglepolar(rad2deg(alpha), c_l ./ c_d, 'C_l/C_d - \alpha', '$\alpha$ [deg]', ...
'$C_l/C_d$ [-]');
plotsinglepolar(c_l, c_d, '$C_d - C_l$', '$C_l$ [-]', '$C_d$ [-]');
plotsinglepolar(c_l, c_d, 'C_d - C_l', '$C_l$ [-]', '$C_d$ [-]');
end
if nargin > 3 || nargin <= 1
plotsinglepolar(rad2deg(alpha), c_m, '$C_m - \alpha$', '$\alpha$ [deg]', '$C_m$ [-]');
plotsinglepolar(rad2deg(alpha), c_m, 'C_m - \alpha', '$\alpha$ [deg]', '$C_m$ [-]');
end
end
......@@ -98,21 +98,25 @@ end
function plotsinglepolar(dataX, dataY, fTitle, fXlabel, fYlabel)
% PLOTSINGLE Standardize polar plots
if ~exist('fTitle', 'var')
fTitle = '';
end
if ~isempty(dataX) && ~isempty(dataY)
figure('PaperUnits', 'inches', 'PaperPosition', [0 0 1280 1024] / 250, 'Name', fTitle);
plot(dataX, dataY);
if ~exist('fTitle', 'var')
fTitle = '';
end
if exist('fXlabel', 'var')
xlabel(fXlabel);
end
if exist('fYlabel', 'var')
ylabel(fYlabel);
figure('PaperUnits', 'inches', 'PaperPosition', [0 0 1280 1024] / 250, 'Name', fTitle);
plot(dataX, dataY);
if exist('fXlabel', 'var')
xlabel(fXlabel);
end
if exist('fYlabel', 'var')
ylabel(fYlabel);
end
setgca();
end
setgca();
end
% --------------------------------------------------------------------------------------------------
......
......@@ -17,7 +17,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
## [4.0.0] 2022-06-09
- **plotpolar**: fix issue when unavailable data
## [4.0.0] - 2022-06-09
### Added
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment