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/logicalIndexingTime.m

13 lines
251 B
Matlab

t = 0:0.001:10;
x = randn(size(t));
selection = x(t > 5 & t < 6);
figure()
hold on
plot(t, x, 'displayname', 'measurements')
plot(t(t > 5 & t < 6), selection, 'displayname', 'selection')
xlabel('Time [s]')
ylabel('Intensity')
legend 'show'
box 'off'