function [ result ] = addprimes( s, e )
z = s:e;
result = sum(z(isprime(z)));
end
z= s:ecreates a unit-spaced vectorzwith elements[s,s+1,s+2,...,e]isprime(z)returns an array with logical0or1in places depending upon whether it is non-prime or prime.- what happens in
z(...)? What is the name of this operation? can anybody explain this?