i have made a code which finds a specific value ‘no’ from the excel sheet but it does the job one by one. i want to automate it so it gives all values with ‘no’ at once.
this is the code i’m using.
data = readtable(‘FINALconvergencecheck_ksst.xlsx’);
data.Properties.VariableNames(1) = "an6cd";
data.Properties.VariableNames(3) = "an6cl";
data.Properties.VariableNames(5) = "an6cm";
data.Properties.VariableNames(7) = "ap0cd";
data.Properties.VariableNames(9) = "ap0cl";
data.Properties.VariableNames(11) = "ap0cm";
data.Properties.VariableNames(13) = "ap3cd";
data.Properties.VariableNames(15) = "ap3cl";
data.Properties.VariableNames(17) = "ap3cm";
data.Properties.VariableNames(19) = "ap7cd";
data.Properties.VariableNames(21) = "ap7cl";
data.Properties.VariableNames(23) = "ap7cm";
data.Properties.VariableNames(25) = "ap10cd";
data.Properties.VariableNames(27) = "ap10cl";
data.Properties.VariableNames(29) = "ap10cm";
data.Properties.VariableNames(31) = "ap12cd";
data.Properties.VariableNames(33) = "ap12cl";
data.Properties.VariableNames(35) = "ap12cm";
data.Properties.VariableNames(37) = "ap14cd";
data.Properties.VariableNames(39) = "ap14cl";
data.Properties.VariableNames(41) = "ap14cm";
data.Properties.VariableNames(43) = "ap15cd";
data.Properties.VariableNames(45) = "ap15cl";
data.Properties.VariableNames(47) = "ap15cm";
data.Properties.VariableNames(49) = "ap17cd";
data.Properties.VariableNames(51) = "ap17cl";
data.Properties.VariableNames(53) = "ap17cm";
data.Properties.VariableNames(2) = "an6cd_r";
data.Properties.VariableNames(4) = "an6cl_r";
data.Properties.VariableNames(6) = "an6cm_r";
data.Properties.VariableNames(8) = "ap0cd_r";
data.Properties.VariableNames(10) = "ap0cl_r";
data.Properties.VariableNames(12) = "ap0cm_r";
data.Properties.VariableNames(14) = "ap3cd_r";
data.Properties.VariableNames(16) = "ap3cl_r";
data.Properties.VariableNames(18) = "ap3cm_r";
data.Properties.VariableNames(20) = "ap7cd_r";
data.Properties.VariableNames(22) = "ap7cl_r";
data.Properties.VariableNames(24) = "ap7cm_r";
data.Properties.VariableNames(26) = "ap10cd_r";
data.Properties.VariableNames(28) = "ap10cl_r";
data.Properties.VariableNames(30) = "ap10cm_r";
data.Properties.VariableNames(32) = "ap12cd_r";
data.Properties.VariableNames(34) = "ap12cl_r";
data.Properties.VariableNames(36) = "ap12cm_r";
data.Properties.VariableNames(38) = "ap14cd_r";
data.Properties.VariableNames(40) = "ap14cl_r";
data.Properties.VariableNames(42) = "ap14cm_r";
data.Properties.VariableNames(44) = "ap15cd_r";
data.Properties.VariableNames(46) = "ap15cl_r";
data.Properties.VariableNames(48) = "ap15cm_r";
data.Properties.VariableNames(50) = "ap17cd_r";
data.Properties.VariableNames(52) = "ap17cl_r";
data.Properties.VariableNames(54) = "ap17cm_r";
display = find(data.ap10cl_r=="no");
k=display;
k1=string(k);
switch k1
case "yes"
disp(‘convereged’)
case "no"
disp(‘not convereged’)
end
here, i have to change the coulum again and again. i want to automate it in a way that it gives all the values where ‘no’ is at once.
kindly help.this is the code i’m using.
data = readtable(‘FINALconvergencecheck_ksst.xlsx’);
data.Properties.VariableNames(1) = "an6cd";
data.Properties.VariableNames(3) = "an6cl";
data.Properties.VariableNames(5) = "an6cm";
data.Properties.VariableNames(7) = "ap0cd";
data.Properties.VariableNames(9) = "ap0cl";
data.Properties.VariableNames(11) = "ap0cm";
data.Properties.VariableNames(13) = "ap3cd";
data.Properties.VariableNames(15) = "ap3cl";
data.Properties.VariableNames(17) = "ap3cm";
data.Properties.VariableNames(19) = "ap7cd";
data.Properties.VariableNames(21) = "ap7cl";
data.Properties.VariableNames(23) = "ap7cm";
data.Properties.VariableNames(25) = "ap10cd";
data.Properties.VariableNames(27) = "ap10cl";
data.Properties.VariableNames(29) = "ap10cm";
data.Properties.VariableNames(31) = "ap12cd";
data.Properties.VariableNames(33) = "ap12cl";
data.Properties.VariableNames(35) = "ap12cm";
data.Properties.VariableNames(37) = "ap14cd";
data.Properties.VariableNames(39) = "ap14cl";
data.Properties.VariableNames(41) = "ap14cm";
data.Properties.VariableNames(43) = "ap15cd";
data.Properties.VariableNames(45) = "ap15cl";
data.Properties.VariableNames(47) = "ap15cm";
data.Properties.VariableNames(49) = "ap17cd";
data.Properties.VariableNames(51) = "ap17cl";
data.Properties.VariableNames(53) = "ap17cm";
data.Properties.VariableNames(2) = "an6cd_r";
data.Properties.VariableNames(4) = "an6cl_r";
data.Properties.VariableNames(6) = "an6cm_r";
data.Properties.VariableNames(8) = "ap0cd_r";
data.Properties.VariableNames(10) = "ap0cl_r";
data.Properties.VariableNames(12) = "ap0cm_r";
data.Properties.VariableNames(14) = "ap3cd_r";
data.Properties.VariableNames(16) = "ap3cl_r";
data.Properties.VariableNames(18) = "ap3cm_r";
data.Properties.VariableNames(20) = "ap7cd_r";
data.Properties.VariableNames(22) = "ap7cl_r";
data.Properties.VariableNames(24) = "ap7cm_r";
data.Properties.VariableNames(26) = "ap10cd_r";
data.Properties.VariableNames(28) = "ap10cl_r";
data.Properties.VariableNames(30) = "ap10cm_r";
data.Properties.VariableNames(32) = "ap12cd_r";
data.Properties.VariableNames(34) = "ap12cl_r";
data.Properties.VariableNames(36) = "ap12cm_r";
data.Properties.VariableNames(38) = "ap14cd_r";
data.Properties.VariableNames(40) = "ap14cl_r";
data.Properties.VariableNames(42) = "ap14cm_r";
data.Properties.VariableNames(44) = "ap15cd_r";
data.Properties.VariableNames(46) = "ap15cl_r";
data.Properties.VariableNames(48) = "ap15cm_r";
data.Properties.VariableNames(50) = "ap17cd_r";
data.Properties.VariableNames(52) = "ap17cl_r";
data.Properties.VariableNames(54) = "ap17cm_r";
display = find(data.ap10cl_r=="no");
k=display;
k1=string(k);
switch k1
case "yes"
disp(‘convereged’)
case "no"
disp(‘not convereged’)
end
here, i have to change the coulum again and again. i want to automate it in a way that it gives all the values where ‘no’ is at once.
kindly help. this is the code i’m using.
data = readtable(‘FINALconvergencecheck_ksst.xlsx’);
data.Properties.VariableNames(1) = "an6cd";
data.Properties.VariableNames(3) = "an6cl";
data.Properties.VariableNames(5) = "an6cm";
data.Properties.VariableNames(7) = "ap0cd";
data.Properties.VariableNames(9) = "ap0cl";
data.Properties.VariableNames(11) = "ap0cm";
data.Properties.VariableNames(13) = "ap3cd";
data.Properties.VariableNames(15) = "ap3cl";
data.Properties.VariableNames(17) = "ap3cm";
data.Properties.VariableNames(19) = "ap7cd";
data.Properties.VariableNames(21) = "ap7cl";
data.Properties.VariableNames(23) = "ap7cm";
data.Properties.VariableNames(25) = "ap10cd";
data.Properties.VariableNames(27) = "ap10cl";
data.Properties.VariableNames(29) = "ap10cm";
data.Properties.VariableNames(31) = "ap12cd";
data.Properties.VariableNames(33) = "ap12cl";
data.Properties.VariableNames(35) = "ap12cm";
data.Properties.VariableNames(37) = "ap14cd";
data.Properties.VariableNames(39) = "ap14cl";
data.Properties.VariableNames(41) = "ap14cm";
data.Properties.VariableNames(43) = "ap15cd";
data.Properties.VariableNames(45) = "ap15cl";
data.Properties.VariableNames(47) = "ap15cm";
data.Properties.VariableNames(49) = "ap17cd";
data.Properties.VariableNames(51) = "ap17cl";
data.Properties.VariableNames(53) = "ap17cm";
data.Properties.VariableNames(2) = "an6cd_r";
data.Properties.VariableNames(4) = "an6cl_r";
data.Properties.VariableNames(6) = "an6cm_r";
data.Properties.VariableNames(8) = "ap0cd_r";
data.Properties.VariableNames(10) = "ap0cl_r";
data.Properties.VariableNames(12) = "ap0cm_r";
data.Properties.VariableNames(14) = "ap3cd_r";
data.Properties.VariableNames(16) = "ap3cl_r";
data.Properties.VariableNames(18) = "ap3cm_r";
data.Properties.VariableNames(20) = "ap7cd_r";
data.Properties.VariableNames(22) = "ap7cl_r";
data.Properties.VariableNames(24) = "ap7cm_r";
data.Properties.VariableNames(26) = "ap10cd_r";
data.Properties.VariableNames(28) = "ap10cl_r";
data.Properties.VariableNames(30) = "ap10cm_r";
data.Properties.VariableNames(32) = "ap12cd_r";
data.Properties.VariableNames(34) = "ap12cl_r";
data.Properties.VariableNames(36) = "ap12cm_r";
data.Properties.VariableNames(38) = "ap14cd_r";
data.Properties.VariableNames(40) = "ap14cl_r";
data.Properties.VariableNames(42) = "ap14cm_r";
data.Properties.VariableNames(44) = "ap15cd_r";
data.Properties.VariableNames(46) = "ap15cl_r";
data.Properties.VariableNames(48) = "ap15cm_r";
data.Properties.VariableNames(50) = "ap17cd_r";
data.Properties.VariableNames(52) = "ap17cl_r";
data.Properties.VariableNames(54) = "ap17cm_r";
display = find(data.ap10cl_r=="no");
k=display;
k1=string(k);
switch k1
case "yes"
disp(‘convereged’)
case "no"
disp(‘not convereged’)
end
here, i have to change the coulum again and again. i want to automate it in a way that it gives all the values where ‘no’ is at once.
kindly help. excel, loop MATLAB Answers — New Questions