Skip to content

Instantly share code, notes, and snippets.

function Problems(n)
##############################################################
if n == 1
Lt = 1.0
K = (t,s) -> 2.0 * cos( t - s )
g = (t) -> exp(t)
y_exc = (t) -> exp(t) * ( 1.0 + t )^2
##############################################################
elseif n == 2
Lt = 3.0
function Problems(n)
##############################################################
if n == "1"
Lt = 1.0
K = (t,s) -> 2.0 * cos( t - s )
g = (t) -> exp(t)
y_exc = (t) -> exp(t) * ( 1.0 + t )^2
##############################################################
elseif n == "2"
Lt = 3.0
using BechmarkTools
# https://ja.coder.work/so/julia/715798
function test1!(foo1,foo2,foo3)
foo3 = foo1 + foo2;
return foo3
end
function test2!(foo1,foo2,foo3)
function hoge(number)
if number == 1
f() = "1"
elseif number == 2
f() = "2"
end
return f
end
f = hoge(1)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
import matplotlib.pyplot as plt
import sympy as sb
x = sb.Symbol('x')
xx = np.linspace(0,1,1000)
plt.rcParams["font.size"] = 12
plt.rcParams['text.usetex'] = True
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
import matplotlib.pyplot as plt
import sympy as sb
class DKA():
def __init__(self):
pass
def p(self,a,x):
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.