I need help running a script. I've already written the code for the script and it works, but I can't run it off a computer with Matlab at the moment. Would somebody mind running this script and letting me know the values for c? And also newnewcombos if it isn't too long?
prime=primes(17);x=[0,1,2,3,4,5,6,7,8,9];combos=perms(x);j=1;for i=1:length(combos);if combos(i,1)~=0;newcombos(j,:)=combos(i,:);j = j+1;end;end;newcombos;for j=1:length(newcombos);for i=1:(length(x)-1)a(j,i)=ismember(sum(newcombos(j,[i,i+1])),prime);endenda;b=size(a);c=0;j=1;for i=1:length(a);if sum(a(i,:))==b(2);c=c+1;newnewcombos(j,:)=newcombos(i,:);j=j+1;end;end;newnewcombosc
Thanks
Best Answer