Skip to content

Instantly share code, notes, and snippets.

View nhasbun's full-sized avatar

Nicolas Hasbun nhasbun

  • Santiago, Chile
View GitHub Profile
@nhasbun
nhasbun / .gitignore
Last active December 30, 2023 10:40
Git ignore file for quartus II projects
# Working with Altera Quartus II (Q2) and do proper versioning is not that easy
# but if you follow some rules it can be accomplished. :)
# This file should be placed into the main directory where the .qpf file is
# found. Generally Q2 throws all entities and so on in the main directory, but
# you can place all stuff also in separate folders. This approach is followed
# here. So when you create a new design create one or more folders where your
# entities will be located and put a .gitignore in there that overrides the
# ignores of this file, e.g. one single rule stating "!*" which allows now all
# type of files. When you add a MegaFunction or another entity to your design,
# simply add it to one of your private folders and Q2 will be happy and manage
@nhasbun
nhasbun / fftsinglesideband.m
Created May 23, 2016 21:00
Single Side Band FFT for Matlab
function [resultado n]=fftsinglesideband(senal);
%% Funcion que retorna una FFT de Single Side
% ademas retorna n, la cantidad de puntos
% considerados para la FFT
% set de frecuencias se puede generar
% usando
% frecuencias =SAMPLING*(0:(n/2))/n;
@nhasbun
nhasbun / simulacionfm.m
Last active August 24, 2022 21:17
Simulacion FM usando Matlab
%% Control 2 EL4005 Principios de Comunicaciones
% Simulacion modulacion FM
clear; tic; kill; clc;
%% PARAMETROS
FRECUENCIA =500;
FRECUENCIAPOR =10e3;
PERIODO =1/FRECUENCIA;
PERIODOPOR =1/FRECUENCIAPOR;
@nhasbun
nhasbun / clasificarKMEANS.m
Last active May 19, 2016 04:10
Classification using KMeans clustering
function [resultado]=clasificar(muestra, centroides)
%%
% muestra de n X no_caracteristicas
% centroides de no_clases X no_caracteristicas
%% Clasificacion de muestras
% segun clustering usando KMEANS.
% Se requiere centroides eiquetados previamente
% es decir, un resultado 1 equivale a la clase 1