% October 2009 % in this lab we will be trying to make a loop that will display the % sum of all of the prime numbers in an array % NOTE: some of the values in the array might be negative! function[] = Prime(x) n = length(x(i)); sum = 0; counter = 0; for i = 1:n j = isprime*(x(i)); if j=1 if x(i)>0 sum = sum + x(i); counter = counter + 1; end end end disp('sum')