Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloyeo committed Jul 11, 2021
1 parent 587ee90 commit 5c1d6b4
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 3 deletions.
46 changes: 46 additions & 0 deletions 고려대학교특강/fourier_sound_examples.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
clear; close all; clc;

fs = 50e3;

t = 0:1/fs:1-1/fs;
yy1 = 0.7*sin(2*pi*200*t);
yy2 = sin(2*pi*350*t);

sound(yy1, fs)
sound(yy2, fs)
sound(yy1+yy2, fs)

%%
figure('position',[68.2, 441, 984, 206]);
plot(t, yy1);
xlim([0, 0.05])
hold on;
xlabel('time(s)');
set(gca,'fontsize',12);
grid on;

figure('position',[68.2, 441, 984, 206]);
plot(t,yy2);
xlim([0, 0.05])
xlabel('time(s)');
set(gca,'fontsize',12);
grid on;


figure('position',[68.2, 441, 984, 206]);
plot(t, yy1+yy2);
xlim([0, 0.05])
xlabel('time(s)');
set(gca,'fontsize',12);
grid on;

%%
Y = zeros(1,500);
Y(200) = 0.7;
Y(350) = 1;
figure;
stem(Y,'linewidth',2)
grid on;
xlabel('frequency (Hz)');
ylabel('Amplitude');
set(gca,'fontsize',12)
7 changes: 4 additions & 3 deletions 기초수학/허근의위치/z_squared_plus_1.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@

%% complex space

real_axis=linspace(-2,2,30);
imag_axis=linspace(-2,2,30);
real_axis=-2:0.1:2;
imag_axis=-2:0.1:2;

fz= zeros(length(real_axis),length(imag_axis));
for iter_r=1:length(real_axis)
Expand All @@ -64,7 +64,8 @@
end
end
figure;
surf(real_axis,imag_axis,abs(fz'),angle(fz'));
% surf(real_axis,imag_axis,abs(fz'),angle(fz'));
surf(real_axis,imag_axis,abs(fz'),abs(fz'));
xlabel('Real(f(z))');
ylabel('Imag(f(z))');
zlabel('Mag(f(z))');
Expand Down

0 comments on commit 5c1d6b4

Please sign in to comment.