This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
struct elemento | |
{ | |
int valor; | |
elemento *proximo; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tkinter as tk | |
import negocio | |
import numpy as np | |
import matplotlib.ticker as ticker | |
import gi | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gtk | |
from matplotlib.figure import Figure | |
from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###################################### | |
# Description # | |
###################################### | |
# | |
# This algorithm finds the solution of an non-linear equation | |
# The equation is the catenary, that is like | |
# h(x) = a * cosh(x/a) | |
# We want to find the value of "a" such that h(x0) = y0 | |
# Where (x0, y0) is known | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import sympy as sp | |
from numpy import linalg as la | |
""" | |
https://mathoverflow.net/questions/425067/block-matrix-reduce-system-for-finite-element-method | |
""" | |
def random_sym_matrix(side): | |
F = np.random.rand(side, side) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import sympy as sp | |
sin, cos = sp.sin, sp.cos | |
k1, k2 = sp.symbols("k1 k2", real=True, positive=True) | |
L1, L2 = sp.symbols("L1 L2", real=True, positive=True) | |
a, p, m= sp.symbols("a p m", real=True, positive=True) | |
theta = sp.symbols("theta") | |
dtheta = sp.symbols("dtheta") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import sympy as sp | |
from matplotlib import pyplot as plt | |
import mpmath as mp | |
mp.mp.dps = 4000 | |
print(mp.mp) | |
sqrt = mp.sqrt | |
def xsqrta(x, a): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Tuple | |
import sympy as sp | |
import numpy as np | |
def Bezier2Canonical(degree: int) -> np.ndarray: | |
""" | |
Returns a transformation matrix between the basis | |
Bezier -> Canonical | |
""" | |
matrix = np.zeros((degree+1, degree+1), dtype="object") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Tuple | |
import numpy as np | |
from fractions import Fraction | |
import math | |
def invert_integer_matrix( | |
matrix: Tuple[Tuple[int]], | |
) -> Tuple[Tuple[int], Tuple[Tuple[int]]]: | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from matplotlib import pyplot as plt | |
from typing import Tuple | |
class Conic: | |
def __init__(self, coefs: Tuple[float]): | |
self.coefs = coefs |
OlderNewer