MATLAB: Do the values not get added into the array such as [2,3,5,7], but instead they get summed up

addingarrayelementssperatedto

clear;
close all
clc;
N = 10;
list=2:N;
values = [2];
list(find(mod(list,2)==0))=[];
tester = 3;
while ~isempty(list)
list(find(mod(list,tester)==0))=[];
tester = list(1);
values = values + [, tester];
end

Best Answer

Because you are using '+'. To concatenate, you would do,
values = [values, tester];