This repository has been archived on 2021-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
scientificComputing/programming/code/logicalVector.m

12 lines
249 B
Matlab

x = 1:10;
%% Erstellen eines logischen Vektors
y = x < 5;
fprintf('Logischer Vektor y:\n');
y
fprintf('Datentyp von y: %s\n', class(y));
%% Auswahl aller Element, die kleiner 5 sind
fprintf('\nAlle Elemente aus x, die kleiner als 5 sind:\n')
x(y)