function THIS = subsasgn(THIS,S,B)

if S(1).type == '.'
    name = S(1).subs;
    assignpos = mynameposition(THIS,{name});
    if ~isnan(assignpos)
        % Regular parameter or steady state.
        THIS.Assign(1,assignpos) = B;
    else
        utils.error('model', ...
            'This name does not exist in the esteq object: ''%s''.', ...
            name);
    end        
end

end
