---json
{
    "comments": {
        "title": {
            "en": "Bounded set with bits",
            "es": "Conjunto acotado con bits",
            "pt": "Conjunto limitado com bits"
        },
        "goal": {
            "en": "Represent membership and set operations with zero-one arrays.",
            "es": "Representar pertenencia y operaciones de conjuntos con arreglos cero-uno.",
            "pt": "Representar pertinência e operações de conjuntos com arrays zero-um."
        },
        "check": {
            "en": "Check the expected result; true means the check passed.",
            "es": "Comprobar el resultado esperado; true indica que la comprobación pasó.",
            "pt": "Verificar o resultado esperado; true indica que a verificação passou."
        },
        "reference": {
            "en": "Topic reference (independently written example): https://github.com/TheAlgorithms/MATLAB-Octave",
            "es": "Referencia temática (ejemplo escrito de forma independiente): https://github.com/TheAlgorithms/MATLAB-Octave",
            "pt": "Referência temática (exemplo escrito de forma independente): https://github.com/TheAlgorithms/MATLAB-Octave"
        }
    }
}
---
% {{ comments.title[lang] }}
% {{ comments.goal[lang] }}
% {{ comments.reference[lang] }}
clear

first_set = zeros(1,6); second_set = zeros(1,6); first_set([1,3,5]) = 1; second_set([3,4,5]) = 1;
intersection_values = first_set & second_set; union_values = first_set | second_set;
difference_values = first_set & ~second_set;

% {{ comments.check[lang] }}
example_check = sum(intersection_values) == 2 && sum(union_values) == 4 && sum(difference_values) == 1
