Exactly, assign followed by the usex0 option.
There are a couple of issues here. To begin with, are all your variables really assigned? If you have a high-level model where YALMIP has to introduce internal variables to represent various complex expressions, these variables will not be assigned, hence the solver doesn't really have an initial guess (as many of the guessed values will have default value 0, and thus the guess is not feasible)
Assuming though that you have a simple model where all variables are defined and assigned by you, you might still have problems. If you use gurobi, YALMIP does not send any initial guess, since the standard MATLAB interface supplied by Gurobi doesn't seem to support this. At least I haven't found the way to do it. The third-party interface gurobi_mex supports this though, and if you use this from YALMIP I send the initial guess. However, I have not used gurobi_mex though since gurobi started shipping with a matlab interface. Cplex claims to support an initial guess, and I send an initial guess, but when I look at the output displayed by cplex, I cannot see any trace of my initial guess (the upper bound in the first number of iterations reported by cplex is worse than the solution I send). I will investigate this further
Having said that, an initial guess, i.e., an upper bound, does not help much most often. In many cases, the solver rapidly finds a very good solution anyway, and the problem is to close the gap, i.e., generating efficient lower bounds.
n = 40;
S = randn(n);S = S*S'/1000; % Covariance
mu = rand(1,n)/100; % Expected return
mutarget = mean(mu);
w = sdpvar(n,1);
d = binvar(n,1); % models if variable is nonzero
F = [sum(w) == 1, 1>=w>=0, mu*w == mutarget];
F = F + [sum(d) <= 10] % At most 10 positions
F = F + [w <= d]; % If d==0 then w = 0
F = F + [w >= 0.1*d]; % If d==1 then w >= 0.1
F = F + [w <= 0.8]; % No position >= 0.8
solvesdp(F,w'*S*w,sdpsettings('solver','cplex'))
% Optimal objective
double(w'*S*w)
% resolve with optimal solution as initial guess
% already assigned since it is the current value
% The value above should be shown as Best integer already
% in node 0 if it actually uses the solution
solvesdp(F,w'*S*w,sdpsettings('solver','cplex','usex0',1))