semestralka
This commit is contained in:
21
semestralka/1.m
Normal file
21
semestralka/1.m
Normal file
@@ -0,0 +1,21 @@
|
||||
clc;
|
||||
close all;
|
||||
clear all;
|
||||
|
||||
% semestralka
|
||||
rawText = fileread('data6.dat');
|
||||
nums = regexp(rawText, '[-+]?\d+', 'match');
|
||||
data = int16(str2double(nums));
|
||||
|
||||
X = DFT_priama(double(data))
|
||||
n = length(X)
|
||||
freq = (0:n-1)/n
|
||||
|
||||
figure;
|
||||
plot(double(data));
|
||||
figure;
|
||||
plot(freq, X)
|
||||
figure;
|
||||
plot(freq, abs(X))
|
||||
figure;
|
||||
plot(freq, angle(X))
|
||||
Reference in New Issue
Block a user