clear;close allclc;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
MATLAB: Do the values not get added into the array such as [2,3,5,7], but instead they get summed up
addingarrayelementssperatedto
Related Question
- Adjusting if loop to calculate probability for each column of dynamic array
- I want to check the list [2:N] for values that are devisible by 2 and remove those from the list, help plz
- Question of automatically creating MATLAB folder
- How can i solve this exam practise question
- How to cut out specific segment from findpeaks function
Best Answer