From bd14c019c9e8fc1530efdef16dca7398d0d5818f Mon Sep 17 00:00:00 2001
From: Thomas Lambert <t.lambert@uliege.be>
Date: Fri, 23 Sep 2022 17:37:54 +0200
Subject: [PATCH] perf: replace exist checks

---
 +af_tools/plotpolars.m | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/+af_tools/plotpolars.m b/+af_tools/plotpolars.m
index 8766059..7b5c613 100644
--- a/+af_tools/plotpolars.m
+++ b/+af_tools/plotpolars.m
@@ -102,17 +102,17 @@ function plotsinglepolar(dataX, dataY, fTitle, fXlabel, fYlabel)
 
     if ~isempty(dataX) && ~isempty(dataY)
 
-        if ~exist('fTitle', 'var')
+        if nargin < 3
             fTitle = '';
         end
 
         figure('PaperUnits', 'inches', 'PaperPosition', [0 0 1280 1024] / 250, 'Name', fTitle);
         plot(dataX, dataY);
 
-        if exist('fXlabel', 'var')
+        if nargin >= 4
             xlabel(fXlabel);
         end
-        if exist('fYlabel', 'var')
+        if nargin >= 5
             ylabel(fYlabel);
         end
 
-- 
GitLab