Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@samubernard
samubernard / factqr.py
Last active November 1, 2022 12:08
module python pour factorisation QR avec méthodes de Gram-Schmidt et Householder
#!/usr/bin/python2.6
# -*-coding:Latin-1 -*
from numpy import *
"""
module python pour factorisation QR avec méthodes de Gram-Schmidt et Householder
Algèbre linéaire et matricielle 3BIM INSA Lyon
2014 v20/11/2014
"""
@samubernard
samubernard / svd_lowrank.py
Last active August 29, 2015 14:10
Exemple d'approximation d'une matrice image par des matrices de bas rangs.
from numpy import *
# chargez une image stockée dans un tableau (image monocolore)
im = genfromtxt('image.csv')
# Décomposition en valeurs singulières
U, s, Vs = linalg.svd(im, full_matrices=True)
# Dimension des matrices
U.shape
@samubernard
samubernard / methode_puissance.ipynb
Last active May 14, 2018 13:31
Méthode de la puissance pour le calcul des valeurs propres -- notebook iphyton
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@samubernard
samubernard / methode_puissance.py
Last active December 7, 2015 01:00
Méthode de la puissance pour le calcul des valeurs propres -- code phyton
# coding: utf-8
## Méthode de la puissance pour le calcul de valeurs propres
# In[1]:
from numpy import *
import matplotlib as plt
import pylab as pl
@samubernard
samubernard / polynome_wilkinson.ipynb
Last active September 18, 2016 09:07
Exemple de calcul de racines d'un polynôme
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@samubernard
samubernard / algo_QR_pur.ipynb
Last active September 18, 2016 09:07
Exemple algorithme QR pur pour le calcul des valeurs propres
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@samubernard
samubernard / tennis_ranking.ipynb
Created September 18, 2016 08:56
Exemple de classement WTP par vecteur propre dominant
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@samubernard
samubernard / fitzhughnagumo_diffusion.m
Last active January 14, 2023 12:50
FitzHugh-Nagumo equation with diffusion on the variable v, 1D, explicit finite difference method
%% FitzHugh-Nagumo avec diffusion 1D
% 1D FitzHugh-Nagumo with diffusion
% parametre des equations
% equation parameters
epsilon = 0.08;
b = 0.7;
c = 0.8;
D = .01; % coefficient de diffusion/diffusion coefficient
I = 0.0;