%Type_of_soil = 'I';

function Saog(soilType)
  switch soilType
    case 'I' 
        disp(1)
        disp('I')
    case 'II'
        disp(2)
        disp('II')
    case 'III'
        disp(3)
        disp('III')
    otherwise
        warning('Unexpected soil type')
  end
end

Saog('I');
Saog('II');
Saog('III');
Saog('III');
Saog('II');
Saog('I');
