How to avoid too many if else statements

I am writing a simple app using matlab app designer, My code works but I want to make it better. I have too many if else conditions. How can I avoid this?

 function buttonpush3Act(app, event)         a3= app.StrokeLengthmmEditField_13.Value;         b3=app.StrokeLengthmmEditField_12.Value;         c3= app.StrokeLengthmmEditField_11.Value;         d3=app.BuildingDimensionmmEditField_6.Value;         e3=app.BuildingDimensionmmEditField_5.Value;         f3=app.BuildingDimensionmmEditField_4.Value;         g3=app.orPreconfiguredrefnumEditField.Value;         h3=app.orPreconfiguredrefnumEditField_2.Value;         i3=app.orPreconfiguredrefnumEditField_3.Value;         j3=app.ActuatorTypeNumberEditField.Value;         k3=app.ActuatorTypeNumberEditField_2.Value;         l3=app.ActuatorTypeNumberEditField_3.Value;           %reset message field         app.OutputMessageEditField_2.Value= "";         % avoid missuse of the ┬┤result┬┤button         if(a3==0 && b3==0 && c3==0 && d3==0 && e3==0 && f3==0 && g3==0 && h3==0)             app.Actuator1EditField.Value= '';             app.Actuator2EditField.Value= '';             app.Actuator3EditField.Value ='';             app.OutputMessageEditField_2.Value ='';              %check for pre configured actuators            elseif((j3== k3 == l3 || j3== k3 || j3== l3 || k3 == l3) && (j3 > 0 && k3 > 0 && l3 > 0)) %avoid having more than one LA40             app.Actuator1EditField.Value= '';             app.Actuator2EditField.Value= '';             app.Actuator3EditField.Value ='';             app.OutputMessageEditField_2.Value =" ERROR2: Unsupported configuration";              %check if special actuators present         elseif((j3 == 40 && k3 ~= 40 && l3 ~= 40) || (j3 ~= 40 && k3 == 40 && l3 ~= 40) || (j3 ~= 40 && k3 ~= 40 && l3 == 40))             % a rotation to to catch la 40 and define it as ref4             dataLa40 = [j3,k3,l3];             ref4 = dataLa40(1)             for r= 1:length(dataLa40)                 if dataLa40(r) == 40;                     ref4 = dataLa40(r);                 end             end             if (ref4 == dataLa40(1))                app.Actuator1EditField.Value = "ref4";             elseif(ref4 == dataLa40(2) )               app.Actuator2EditField.Value = "ref4";             else(ref4 == dataLa40(3))                 app.Actuator3EditField.Value = "ref4";             end              %  if act1== ref4 what if act2== ref4 what if act3== ref4 what           %check for rule D           elseif((a3 ~= b3) && (a3~= c3) && (b3 ~= c3) && (a3 > 0 && b3 > 0 && c3 > 0))              data= [a3,b3,c3];             ref2= data(1)             ref3=data(1)             ref1=data(1)             for j = 1:length(data)                 %largest stroke length                 if data(j)>ref2;                     ref2=data(j);                 end             end             for k = 1:length(data)                 %smallest stroke length                 if data(k)<ref3;                     ref3=data(k);                 end             end              for m = 1:length(data)                 %stroke length in the middle                 if ref3<data(m) & data(m)<ref2;                     ref1=data(m);                 end             end              if (ref2== a3)                 app.Actuator1EditField.Value= "ref2"  ;             elseif(ref2==b3)                 app.Actuator2EditField.Value= "ref2"  ;             else(ref2==c3)                 app.Actuator3EditField.Value= "ref2"  ;             end             if(ref3==a3)                 app.Actuator1EditField.Value= "ref3"  ;             elseif(ref3==b3)                 app.Actuator2EditField.Value= "ref3"  ;             else(ref3==c3)                 app.Actuator3EditField.Value= "ref3"  ;             end             if(ref1==a3)                 app.Actuator1EditField.Value= "ref1"  ;             elseif(ref1==b3)                 app.Actuator2EditField.Value= "ref1"  ;             else(ref1==c3)                 app.Actuator3EditField.Value= "ref1"  ;             end             % elseif((a3 == b3) || (a3 == c3) || (b3 == c3))             %check for rule C         else(((a3 == b3) || (a3 == c3) || (b3 == c3)) && (a3 > 0 && b3 > 0 && c3 > 0))              data_list= [d3,e3,f3];             ref2= data_list(1)             ref3=data_list(1)             ref1=data_list(1)             for n = 1:length(data_list)                 %largest Building Dimension                 if data_list(n)>ref2;                     ref2=data_list(n);                 end             end             for p = 1:length(data_list)                 %smallest Building Dimension                 if data_list(p)<ref3;                     ref3=data_list(p);                 end             end              for q = 1:length(data_list)                 %Building Dimension in the middle                 if ref3<data_list(q) & data_list(q)<ref2;                     ref1=data_list(q);                 end             end                if (ref2== d3)                 app.Actuator1EditField.Value= "ref2"  ;             elseif(ref2==e3)                 app.Actuator2EditField.Value= "ref2"  ;             else(ref2==f3)                 app.Actuator3EditField.Value= "ref2"  ;             end             if(ref3==d3)                 app.Actuator1EditField.Value= "ref3"  ;             elseif(ref3==e3)                 app.Actuator2EditField.Value= "ref3"  ;             else(ref3==f3)                 app.Actuator3EditField.Value= "ref3"  ;             end             if(ref1==d3)                 app.Actuator1EditField.Value= "ref1"  ;             elseif(ref1==e3)                 app.Actuator2EditField.Value= "ref1"  ;             else(ref1==f3)                 app.Actuator3EditField.Value= "ref1"  ;             end              %check for eqaul building dimentions             if(((d3 == e3) || (d3 == f3) || (e3 == f3)) && (d3 > 0 && e3 > 0 && f3 > 0))                 app.OutputMessageEditField_2.Value ="Use channel assignment or config. tool";                 app.Actuator1EditField.Value= '';                 app.Actuator2EditField.Value= '';                 app.Actuator3EditField.Value ='';              else                 app.OutputMessageEditField_2.Value ="ERROR2; Fill the required fields";                 app.Actuator1EditField.Value= '';                 app.Actuator2EditField.Value= '';                 app.Actuator3EditField.Value ='';              end         end          %should be out of main loop, independent         if(a3 == 0 ||b3 == 0 ||c3 == 0 ||d3 == 0 ||e3 == 0 ||f3 == 0 ||j3 == 0 ||k3 == 0 ||l3 == 0 )             app.OutputMessageEditField_2.Value ="ERROR2; Fill the required fields";             app.Actuator1EditField.Value= '';             app.Actuator2EditField.Value= '';             app.Actuator3EditField.Value ='';         end     end