Created
August 1, 2016 18:56
-
-
Save arthurafarias/05059d1be475e5f96f733e0b8127b090 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear; clc; | |
fs = 8000; | |
ws = 2*pi*fs; | |
fc = 600; | |
wc = 2*pi*fc; | |
N = 29; | |
T = 1/fs; | |
syms n_; | |
h = @(n,T) limit(1./(n_.*pi).*sin(wc.*n_.*T),n_,n); | |
b = @(i) h(i-(N-1)/2,T); | |
for i = 1:N | |
bi(i) = b(i); | |
bi_d(i) = double(bi(i)); | |
fprintf('b_%d &= %s = %.04f\\\\\n', i, char(latex(simplify(bi(i)))), bi_d(i)); | |
end |
Author
arthurafarias
commented
Aug 1, 2016
{-0.00383035667401370,-0.0155914880631440,-0.0257832895730377,-0.0318309886183791,-0.0315129094781571,-0.0233872320947160,-0.00711351953745401,0.0163938607180578,0.0450158158078553,0.0756826728640657,0.104796987759965,0.128759053700121,0.144509664300617,0.150000000000000,0.144509664300617,0.128759053700121,0.104796987759965,0.0756826728640657,0.0450158158078553,0.0163938607180578,-0.00711351953745401,-0.0233872320947160,-0.0315129094781571,-0.0318309886183791,-0.0257832895730377,-0.0155914880631440,-0.00383035667401370,0.00702594030773904,0.0150052719359518}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment