It's not typically necessary (or a good idea) to have data in a UI mirrored in the base workspace, but here's how you can do it (for educational purposes).
Ground=40;
ground_control=uicontrol('Style','edit', 'String', num2str(Ground), 'Position', [315, 70, 70, 20], 'Callback', {@change_ground});
function change_ground(hObject, eventdata, handles)
Ground = str2double(get(hObject,'String'));
assignin('base','Ground',Ground);
end
Typically your uicontrol would be part of a larger GUI that would be handling all the data, so that's why you wouldn't need to do this.
