Skip to content

Instantly share code, notes, and snippets.

View alvgaona's full-sized avatar
🚀

Alvaro Gaona alvgaona

🚀
View GitHub Profile
@alvgaona
alvgaona / qr.m
Created March 30, 2024 02:23
Householder QR Decomposition
A = [
-1 -1 1;
1 3 3;
-1 -1 5
];
[QQ,RR] = qr(A);
[m, n] = size(A);
@alvgaona
alvgaona / bessi.m
Created December 8, 2020 13:11
Zeroth Order Modified Bessel Function of the First Kind
x = 2;
ax = abs(x);
if (ax < 3.75)
y = x/3.75;
y = y*y;
ans = 1.0+y*(3.5156229+y*(3.0899424+y*(1.2067492 + y*(0.2659732+y*(0.360768e-1+y*0.45813e-2)))));
else
y=3.75/ax;