Skip to content

Instantly share code, notes, and snippets.

View arthurafarias's full-sized avatar

Arthur de Araújo Farias arthurafarias

  • Campina Grande, Brasil
View GitHub Profile
@arthurafarias
arthurafarias / ufcg-ee-lpc-p03q01.m
Last active March 29, 2016 03:02
UFCG - EE - LPC - P03 Q01
h = @(n,wc,ws) 2*wc/ws*sinc(n*2*wc/ws); % impulse response of a lowpass filter in discrete domain, ws sampling angular frequency, wc cutoff frequency
h_causal = @(n,wc,ws,N) h(n-(N-1)/2,wc,ws); % causal version of impulse response
N = 33; % given in question
wc = 2*pi*500; % given in question
ws = 2*pi*8000; % given in question
i = 0:(N-1); % indexer, vector length is N-1.
bi = h_causal(i,wc,ws,length(i)); % FIR gains
@arthurafarias
arthurafarias / signal_analysis.svg
Created November 18, 2015 03:54
A4 paper to Signal Comparison and Analysis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arthurafarias
arthurafarias / bode_a4.svg
Last active November 18, 2015 04:03
A4 Paper to Bode Plot Diagrams
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
% Original code available to download in: https://docs.google.com/document/d/1zQxnDVBOtXf0OEUH-vTztGY1Dbm72WlglKVueo0TqgU/edit
% This code was shared by Brian Douglas in youtube.com link: https://www.youtube.com/watch?v=sof3meN96MA
% -------------------------------------------------
% A small interative demonstration of Cauchy Argument Principle
% -------------------------------------------------
function Interact(Pos)
if nargin == 0
@arthurafarias
arthurafarias / routh.m
Last active November 5, 2015 12:29
Function do Create Routh Matrix from any Polynomial in Vector Form
function [ routhm, characteristic, n_unstable_poles ] = routh(pol)
try
assert( all( size(pol,1) == 1 ) );
catch ERR
rethrow(ERR)
end
pol_order = size(pol,2)-1;
@arthurafarias
arthurafarias / load_mega_instances.sh
Last active March 15, 2025 19:59
Simple example script to load multiples instances of mega.co.nz client on linux.
#!/bin/sh
for d in */ ; do
HOME=$(pwd)/$d;
echo $d;
# Remove the comment by your need
# megasync # first run (configure client by client at once)
# megasync 2> /dev/null & # load all clients at non blocking way
done