From a7aca28bad4f282e2f761362de17935c395a6d2e Mon Sep 17 00:00:00 2001
From: Mauco03 <marco.gaibotti@skywarder.eu>
Date: Fri, 10 May 2024 19:17:30 +0200
Subject: [PATCH] [refactoring-ode][Component] Changed reference object from
 obj to configObj

---
 classes/Component.m | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/classes/Component.m b/classes/Component.m
index cf1a5e4..5e0869d 100644
--- a/classes/Component.m
+++ b/classes/Component.m
@@ -64,10 +64,10 @@ classdef Component < Config
             configObj = varsIn.(varName);
 
             if options.elementWise
-                fields = obj.getProperties('writable');
-                for j = 1:size(fields, 2)
-                    if isempty([configObj.(fields{j})]), continue; end
-                    obj.(fields{j}) = configObj.(fields{j});
+                fields = configObj.getProperties('writable');
+                for field = fields
+                    if isempty([configObj.(field)]), continue; end
+                    obj.(field) = configObj.(field);
                 end
             else
                 obj = configObj;
-- 
GitLab