So I have this problem for school and I don't know how to take an element out of an array or matrix and put it into another one. Here is the question:
Create a function meancomp that compares the mean value of the odd numbered elements with the mean value of the even numbered elements and returns:0, if they are equal1, if the mean of the odd numbered elements is greater,2, if the mean of the even numbered elements is greater"
This is what I have:
for m=1:length(x) if mod(x,2)==0 % code end
Best Answer