% comment

disp('hello');
disp('hello');
disp('hello');


for i=1:10
    disp('hello');
end

list = [ 50, 40, 30, 20, 10];
swapped = true;
while (swapped)
    swapped = false;
    for mat=1:4
        disp(list)
        if (list(mat) > list(mat+1))
            disp(sprintf('swap list items %d and %d', mat, mat+1));
            % swap two values in a row
            temp = list(mat);
            list(mat) = list(mat+1);
            list(mat+1) = temp;
            swapped = true;
        else
            disp('no swap needed');
            
        end
    end
end