import numpy as np
import matplotlib.pyplot as plt
import scipy.optimize as opt
import scipy.integrate as quade
boltzmann_const = 1.38e-23
planck_const = 6.62e-34
hbar = planck_const / ( 2 * np.pi )
transition_temp = 9.2
gap_energy_at_zero_kelvin = 3.528 / ( 2 * transition_temp * boltzmann_const )
debye_freq = ( 296 * boltzmann_const ) / hbar
# For subtracting from root_of_integral
a_const = np.log( ( 1.13 * hbar * debye_freq ) / ( boltzmann_const * transition_temp) )
# For simplifying function f.
b_const = ( hbar * debye_freq ) / ( 2 * boltzmann_const)
x_values = np.arange(0.01,0.001,0.0001)
delta = []
for x in x_values:
def fun(CE):
Radius = np.sqrt(CE * CE + x * x)
return np.tanh(1477.92 * Radius) / Radius
integral = quade.quad(fun, 0, 1)
delta_val = opt.fsolve(lambda CE:integral, 1e-23) - a_const
delta.append(delta_val)
delta=np.array(delta)
plt.plot(delta, x_values)
--------
내가 만들려고하는 코드도 올리겠음내가 만들고 싶은코드는 저 2번째 그래프 형태임.
그걸 만들기위해서 첫번째 매스매티카 자료를 참조했고
그를 바탕으로 저렇게 만듬
근데 파이썬을 실행하면
저 메세지가 뜨고 plot창이 안뜸
아는 사람 없음?
튜토리얼보라는 컴퓨터말 들어라
에러메세지도 안보임 확대해서 다시올려
currying이었나 함수형언어 기법중에 그런게 있었는데 찾아보셈. 이름이 기억이 안나
ㅇㅇ//에러메세지가 없음. 그냥 저렇게 뜨고 메세지가 안떠
qwer//currying?
플랏 말고 그냥 프린트 하면 어디에 출력되는제부터 확인하삼. 글고 이런거는 쥬피터 많이 ㅆ는데 왜안쥬피터요 - 164260의 휘발성 계정
쥬피터가 matplotlib하고 같이 쓰기 좋음 - 164260의 휘발성 계정