% Input:
% state_id: integer

% Output:

% Description:
% Deletes the stored computation state with id state_id from the global
% variable stored_states

function [] = delete_state(state_id)
% no checks for non-available computation states implemented
global stored_states;

new = cell(length(stored_states)-1);

for i=1:state_id-1
    new{i} = stored_states{i};
end;

for i=state_id:length(stored_states)
    if i+1 <= length(stored_states)
        new{i} = stored_states{i+1};
    end;
end;

stored_states = new;