Skip to content
Snippets Groups Projects
Commit b0b8730f authored by Joose Mustonen's avatar Joose Mustonen
Browse files

Merge branch 'master' into 'main'

3. tehty

See merge request !1
parents 3b2c2c45 1f2d98a7
Branches
No related tags found
1 merge request!13. tehty
f = 100;
T = 1/f;
t = 0:0.001:5*T;
n_a = 0:1/(400*f):5*T;
n_b = 0:1/(100*f):5*T;
n_c = 0:1/(90*f):5*T;
y = sin(200*pi*t);
y_a = sin(200*pi*n_a);
y_b = sin(200*pi*n_b);
y_c = sin(200*pi*n_c);
figure;
subplot(3,1,1);
stem(n_a, y_a);
hold on;
plot(t, y);
title('Sample rate 400 Hz');
subplot(3,1,2);
stem(n_b, y_b);
hold on;
plot(t, y);
title('Sample rate 100 Hz');
subplot(3,1,3);
stem(n_c, y_c);
hold on;
plot(t, y);
title('Sample rate 90 Hz');
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment