当前位置: 首页>>代码示例>>Python>>正文


Python bessel.jn函数代码示例

本文整理汇总了Python中sympy.functions.special.bessel.jn函数的典型用法代码示例。如果您正苦于以下问题:Python jn函数的具体用法?Python jn怎么用?Python jn使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了jn函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_specfun

def test_specfun():
    n = Symbol('n')
    for f in [besselj, bessely, besseli, besselk]:
        assert julia_code(f(n, x)) == f.__name__ + '(n, x)'
    for f in [airyai, airyaiprime, airybi, airybiprime]:
        assert julia_code(f(x)) == f.__name__ + '(x)'
    assert julia_code(hankel1(n, x)) == 'hankelh1(n, x)'
    assert julia_code(hankel2(n, x)) == 'hankelh2(n, x)'
    assert julia_code(jn(n, x)) == 'sqrt(2)*sqrt(pi)*sqrt(1./x).*besselj(n + 1/2, x)/2'
    assert julia_code(yn(n, x)) == 'sqrt(2)*sqrt(pi)*sqrt(1./x).*bessely(n + 1/2, x)/2'
开发者ID:asmeurer,项目名称:sympy,代码行数:10,代码来源:test_julia.py

示例2: test_latex_bessel

def test_latex_bessel():
    from sympy.functions.special.bessel import besselj, bessely, besseli, besselk, hankel1, hankel2, jn, yn
    from sympy.abc import z

    assert latex(besselj(n, z ** 2) ** k) == r"J^{k}_{n}\left(z^{2}\right)"
    assert latex(bessely(n, z)) == r"Y_{n}\left(z\right)"
    assert latex(besseli(n, z)) == r"I_{n}\left(z\right)"
    assert latex(besselk(n, z)) == r"K_{n}\left(z\right)"
    assert latex(hankel1(n, z ** 2) ** 2) == r"\left(H^{(1)}_{n}\left(z^{2}\right)\right)^{2}"
    assert latex(hankel2(n, z)) == r"H^{(2)}_{n}\left(z\right)"
    assert latex(jn(n, z)) == r"j_{n}\left(z\right)"
    assert latex(yn(n, z)) == r"y_{n}\left(z\right)"
开发者ID:kushal124,项目名称:sympy,代码行数:12,代码来源:test_latex.py

示例3: test_specfun

def test_specfun():
    n = Symbol('n')
    for f in [besselj, bessely, besseli, besselk]:
        assert octave_code(f(n, x)) == f.__name__ + '(n, x)'
    assert octave_code(hankel1(n, x)) == 'besselh(n, 1, x)'
    assert octave_code(hankel2(n, x)) == 'besselh(n, 2, x)'
    assert octave_code(airyai(x)) == 'airy(0, x)'
    assert octave_code(airyaiprime(x)) == 'airy(1, x)'
    assert octave_code(airybi(x)) == 'airy(2, x)'
    assert octave_code(airybiprime(x)) == 'airy(3, x)'
    assert octave_code(jn(n, x)) == 'sqrt(2)*sqrt(pi)*sqrt(1./x).*besselj(n + 1/2, x)/2'
    assert octave_code(yn(n, x)) == 'sqrt(2)*sqrt(pi)*sqrt(1./x).*bessely(n + 1/2, x)/2'
开发者ID:Festy,项目名称:sympy,代码行数:12,代码来源:test_octave.py

示例4: test_latex_bessel

def test_latex_bessel():
    from sympy.functions.special.bessel import (besselj, bessely, besseli,
            besselk, hankel1, hankel2, jn, yn)
    from sympy.abc import z
    assert latex(besselj(n, z**2)**k) == r'J^{k}_{n}\left(z^{2}\right)'
    assert latex(bessely(n, z)) == r'Y_{n}\left(z\right)'
    assert latex(besseli(n, z)) == r'I_{n}\left(z\right)'
    assert latex(besselk(n, z)) == r'K_{n}\left(z\right)'
    assert latex(hankel1(n, z**2)**2) == \
              r'\left(H^{(1)}_{n}\left(z^{2}\right)\right)^{2}'
    assert latex(hankel2(n, z)) == r'H^{(2)}_{n}\left(z\right)'
    assert latex(jn(n, z)) == r'j_{n}\left(z\right)'
    assert latex(yn(n, z)) == r'y_{n}\left(z\right)'
开发者ID:101man,项目名称:sympy,代码行数:13,代码来源:test_latex.py

示例5: test_specfun

def test_specfun():
    n = Symbol('n')
    for f in [besselj, bessely, besseli, besselk]:
        assert octave_code(f(n, x)) == f.__name__ + '(n, x)'
    assert octave_code(hankel1(n, x)) == 'besselh(n, 1, x)'
    assert octave_code(hankel2(n, x)) == 'besselh(n, 2, x)'
    assert octave_code(airyai(x)) == 'airy(0, x)'
    assert octave_code(airyaiprime(x)) == 'airy(1, x)'
    assert octave_code(airybi(x)) == 'airy(2, x)'
    assert octave_code(airybiprime(x)) == 'airy(3, x)'
    assert octave_code(uppergamma(n, x)) == 'gammainc(x, n, \'upper\')'
    assert octave_code(lowergamma(n, x)) == 'gammainc(x, n, \'lower\')'
    assert octave_code(jn(n, x)) == 'sqrt(2)*sqrt(pi)*sqrt(1./x).*besselj(n + 1/2, x)/2'
    assert octave_code(yn(n, x)) == 'sqrt(2)*sqrt(pi)*sqrt(1./x).*bessely(n + 1/2, x)/2'
    assert octave_code(LambertW(x)) == 'lambertw(x)'
    assert octave_code(LambertW(x, n)) == 'lambertw(n, x)'
开发者ID:Salmista-94,项目名称:sympy,代码行数:16,代码来源:test_octave.py

示例6: test_sympy__functions__special__bessel__jn

def test_sympy__functions__special__bessel__jn():
    from sympy.functions.special.bessel import jn
    assert _test_args(jn(0, x))
开发者ID:101man,项目名称:sympy,代码行数:3,代码来源:test_args.py


注:本文中的sympy.functions.special.bessel.jn函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。