write a function sumeveryother( v ) that takes in a vector and returns the sum of every other element, starting with the first element. if the vector is empty, your function should return zero. in matlab
main.m
functionresult = sumeveryother(v)ifisempty(v)
result = 0;
else result = sum(v(1:2:end));
endend