MATLAB: Maximize expected return with constraints

basic financebasic optimization;

Hi guys, I need help for a really easy maximization.
Max E(r)=(mean vector)*(weight vector)'
I want to max the return by changing the weight vector (variable). The mean vector is constant.
The constraints are : (vector of 1's)*(weight vector)' = 1 %weights sum to 1
lb wi >= 0
ub wi =< 1
The solution should give me the Max E(r) and the corresponding (weight vector).
Thank you.

Best Answer

f=-[0.0055; 0.0063; 0.0080; 0.0060; 0.0037; 0.0035; -0.0028; 0.0071; 0.0055; 0.0028];
Aeq=[1 1 1 1 1 1 1 1 1 1];
beq=[1];
lb=zeros(10,1);
ub=ones(10,1);
x = linprog(f,[],[],Aeq,beq,lb,ub);
does not work ?
Best wishes
Torsten.