function x = set_variable(value)
    try
        if(class(value)=='double')
            x = value;
        else
            error('Invalid Input');
        end
    catch
        error('Unexpected Input');
end