Skip to content

Instantly share code, notes, and snippets.

View dangpzanco's full-sized avatar

Daniel Zanco dangpzanco

View GitHub Profile
getData(module, type)
{
}
measureApp()
{
////sera?//////////while (1): //the app is always running, can only be stopped/paused by the OS
@dangpzanco
dangpzanco / testing_integrals.jl
Last active April 25, 2016 04:20
Duas respostas para a mesma integral
using PyPlot
PyPlot.close("all")
## { MATLAB CODE
x = linspace(-pi/3,pi/3,100);
int1 = 0.25*sec(x).^4 - tan(x).^2 + log(abs(cos(x)));
int2 = 0.25*tan(x).^4 - 0.5*tan(x).^2 - log(abs(sec(x)));
plot(x,int1,x,int2)
Vl = 380
Il = 1.34
P3f = 594.4
n = 1763
ns = 1800
m = 0.7
clc
close all
clear all
% numero de pontos
N = 500;
% funcao e sua derivada em relacao a x
f = @(x,y) log( x + (x.^2 + y.^2).^0.5 );
fx = @(x,y) (x.^2 + y.^2).^-0.5;
import pandas as pd
import os
import gc
import blaze
import numpy as np
# def generate_arrays_from_file(path):
# while 1:
# f = open(path)
# for line in f:
% colocar o arquivo na pasta Documents/MATLAB
% executa a função no MATLAB apertando F5
clc % limpa a linha de comando
close all % fecha os graficos (se tiver)
clear all % limpa as variáveis
% cria primeira função
% os .* e .^ são pro caso de x ser um vetor,
% esses operadores realizam as contas elemento à elemento
f = @(x) 2*x.*cos(2*x) - (x-2).^2;
@dangpzanco
dangpzanco / secante.m
Last active September 12, 2016 01:04
clc % limpa a linha de comando
close all % fecha os graficos (se tiver)
clear all % limpa as variáveis
f = @(x) 2*x*cos(2*x) - (x-2)^2; % função de interesse
x = [3, 2]; % intervalo de interesse
% critérios de parada
num_iters = 100; % número de iterações
epsilon = 1e-5; % tolerância de convergência
[18:53] == dangpzanco [bfbf3627@gateway/web/freenode/ip.191.191.54.39] has joined #yocto
[18:53] <dangpzanco> hi
[18:54] <dangpzanco> is there anybody out there?
[18:56] -YoctoAutoBuilder:#yocto- build #953 of nightly-arm is complete: Failure [failed Running Sanity Tests Building Toolchain Images BuildImages_1 Building Toolchain Images_1 BuildImages_2] Build details are at http://autobuilder.yoctoproject.org/main/builders/nightly-arm/builds/953
[18:56] == smferris [~smferris@192.95.10.156] has joined #yocto
[18:59] == rburton [~Adium@home.burtonini.com] has quit [Quit: Leaving.]
[19:01] == fmeerkoetter [~quassel@service.basyskom.com] has quit [Remote host closed the connection]
[19:01] == bfederau [~quassel@service.basyskom.com] has quit [Remote host closed the connection]
[19:01] == fmeerkoetter [~quassel@service.basyskom.com] has joined #yocto
[19:01] == bfederau [~quassel@service.basyskom.com] has joined #yocto
clc
clearvars
close all
i = 0.1;
n = 10;
f1 = [800 0 0 0 0 600 0 0 0 0 600];
f2 = [1400 40 40 40 40 40 20 20 20 20 20];
clearvars
clc
close all
fs = 8000;
fc = 440;
omega = exp(1j*2*pi*fc/fs);
amplitude = 0.5;
signal_time = 1; % in seconds