0
0
mirror of http://CODE.RHODECODE.COM/u/O/O/O synced 2024-11-27 03:48:51 -05:00
O/𖣠⚪ᕤᕦ𔗢ИN𔗢ꖴ𔗢ᙏ𔗢ᗩ𔗢ᴥ𔗢ᕤᕦ𔗢Ⓞ𔗢ᴥ𔗢ߦ𖣓𖡼𔗢𖡼𔗢𖡼𔗢𖡼⚪🞋⚪𖡼𔗢𖡼𔗢𖡼𔗢𖡼𖣓ߦ𔗢ᴥ𔗢Ⓞ𔗢ᕤᕦ𔗢ᴥ𔗢ᗩ𔗢ᙏ𔗢ꖴ𔗢ИN𔗢ᕤᕦ⚪𖣠/⚪ИN⚪Ⓞ⚪옷⚪✤⚪人⚪ߦ⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪ߦ⚪人⚪✤⚪옷⚪Ⓞ⚪ИN⚪/⚪ᴥ⚪ᗱᗴ⚪✤⚪人⚪ߦ⚪ᑎ⚪ᒍᒐ⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪ᒍᒐ⚪ᑎ⚪ߦ⚪人⚪✤⚪ᗱᗴ⚪ᴥ⚪/YP.⚪ИN⚪Ⓞ⚪ꖴ⚪✤⚪ᗩ⚪ᙏ⚪ꖴ⚪ꕤ⚪Ⓞ⚪ᴥ⚪ߦ⚪ᗩ⚪◯⚪ᙁ⚪ᗩ⚪ꖴ⚪✤⚪ИN⚪ᗱᗴ⚪ИN⚪Ⓞ⚪ߦ⚪ꕤ⚪ᗱᗴ⚪◯⚪ᗱᗴ⚪ᙁ⚪ᑐᑕ⚪ᴥ⚪ꖴ⚪ᑎ⚪¤⚪ᔓᔕ⚪◯⚪ᗱᗴ⚪ᴥ⚪ᑎ⚪✤⚪ᗩ⚪ᗯ⚪ᴥ⚪ᑎ⚪ᑐᑕ⚪◯⚪ᔓᔕ⚪ᑎ⚪ꖴ⚪⚭⚪ᗩ⚪ꗳ⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪ꗳ⚪ᗩ⚪⚭⚪ꖴ⚪ᑎ⚪ᔓᔕ⚪◯⚪ᑐᑕ⚪ᑎ⚪ᴥ⚪ᗯ⚪ᗩ⚪✤⚪ᑎ⚪ᴥ⚪ᗱᗴ⚪◯⚪ᔓᔕ⚪¤⚪ᑎ⚪ꖴ⚪ᴥ⚪ᑐᑕ⚪ᙁ⚪ᗱᗴ⚪◯⚪ᗱᗴ⚪ꕤ⚪ߦ⚪Ⓞ⚪ИN⚪ᗱᗴ⚪ИN⚪✤⚪ꖴ⚪ᗩ⚪ᙁ⚪◯⚪ᗩ⚪ߦ⚪ᴥ⚪Ⓞ⚪ꕤ⚪ꖴ⚪ᙏ⚪ᗩ⚪✤⚪ꖴ⚪Ⓞ⚪ИN⚪.PY
2024-02-17 17:48:06 +00:00

16 lines
4.3 KiB
Python
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import plotly.graph_objects as ⵙᔓᔕ𖧷ᑐᑕᗱᗴᒐ8O옷ߦᗩᴥᕤᕦⵙⵙᕤᕦᴥᗩߦ옷O8ᒐᗱᗴᑐᑕ𖧷ᔓᔕⵙ
import numpy as ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ
def ⵙᗱᗴ𖧷ᑎߦᙏOᑐᑕⵙⵙᑐᑕOᙏߦᑎ𖧷ᗱᗴⵙ(x):
return (1-((-((-1)**ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.floor(x/ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.pi*2)*(ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.exp(-1/((x/ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.pi*2)-ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.floor((x/ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.pi*2))))
/(ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.exp(-1/((x/ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.pi*2)-ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.floor((x/ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.pi*2))))+ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.exp(-1/(1-(x/ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.pi*2)+ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.floor((x/ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.pi*2))))))) +
((-1)**ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.floor((x/ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.pi*2)/1)*(ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.exp(-1/(1-(x/ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.pi*2)+ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.floor((x/ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.pi*2))))/(ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.exp(-1/((x/ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.pi*2)-
ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.floor((x/ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.pi*2))))+ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.exp(-1/(1-(x/ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.pi*2)+ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.floor((x/ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.pi*2))))))))/2 + .5))
ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔꕤⵙⵔⵙⵔⵙꕤⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ=ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.linspace(0,4*ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.pi,1000)
ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔᗩߦᗩ𐊌ⵙⵔⵙⵔⵙ𐊌ᗩߦᗩⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ=ⵙᗱᗴ𖧷ᑎߦᙏOᑐᑕⵙⵙᑐᑕOᙏߦᑎ𖧷ᗱᗴⵙ(ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔꕤⵙⵔⵙⵔⵙꕤⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ)
ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔᗩ𖧷ᗱᗴ옷𖧷ⵙⵔⵙⵔⵙ𖧷옷ᗱᗴ𖧷ᗩⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ=ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.cumsum(ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔᗩߦᗩ𐊌ⵙⵔⵙⵔⵙ𐊌ᗩߦᗩⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ)*(ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔꕤⵙⵔⵙⵔⵙꕤⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ[1]-ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔꕤⵙⵔⵙⵔⵙꕤⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ[0])
ⵙᔓᔕᗱᗴ𖧷ᗩИNꖴᗝᴥOᑐᑕꕤⵙⵙꕤᑐᑕOᴥᗝꖴИNᗩ𖧷ᗱᗴᔓᔕⵙ=ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.cumsum(ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.cos(ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔᗩ𖧷ᗱᗴ옷𖧷ⵙⵔⵙⵔⵙ𖧷옷ᗱᗴ𖧷ᗩⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ))*(ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔꕤⵙⵔⵙⵔⵙꕤⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ[1]-ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔꕤⵙⵔⵙⵔⵙꕤⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ[0])
ⵙᔓᔕᗱᗴ𖧷ᗩИNꖴᗝᴥOᑐᑕ人ⵙⵙ人ᑐᑕOᴥᗝꖴИNᗩ𖧷ᗱᗴᔓᔕⵙ=ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.cumsum(ⵙ人ߦᙏᑎИNⵙⵙИNᑎᙏߦ人ⵙ.sin(ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔᗩ𖧷ᗱᗴ옷𖧷ⵙⵔⵙⵔⵙ𖧷옷ᗱᗴ𖧷ᗩⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ))*(ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔꕤⵙⵔⵙⵔⵙꕤⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ[1]-ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔꕤⵙⵔⵙⵔⵙꕤⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ[0])
ⵙᗱᗴᴥᑎᕤᕦꖴꗳⵙⵔⵙⵔⵙꗳꖴᕤᕦᑎᴥᗱᗴⵙ=ⵙᔓᔕ𖧷ᑐᑕᗱᗴᒐ8O옷ߦᗩᴥᕤᕦⵙⵙᕤᕦᴥᗩߦ옷O8ᒐᗱᗴᑐᑕ𖧷ᔓᔕⵙ.Figure()
ⵙᗱᗴᴥᑎᕤᕦꖴꗳⵙⵔⵙⵔⵙꗳꖴᕤᕦᑎᴥᗱᗴⵙ.add_trace(ⵙᔓᔕ𖧷ᑐᑕᗱᗴᒐ8O옷ߦᗩᴥᕤᕦⵙⵙᕤᕦᴥᗩߦ옷O8ᒐᗱᗴᑐᑕ𖧷ᔓᔕⵙ.Scatter(x=ⵙᔓᔕᗱᗴ𖧷ᗩИNꖴᗝᴥOᑐᑕꕤⵙⵙꕤᑐᑕOᴥᗝꖴИNᗩ𖧷ᗱᗴᔓᔕⵙ,y=ⵙᔓᔕᗱᗴ𖧷ᗩИNꖴᗝᴥOᑐᑕ人ⵙⵙ人ᑐᑕOᴥᗝꖴИNᗩ𖧷ᗱᗴᔓᔕⵙ,mode='lines',name='Curve'))
ⵙᗱᗴᴥᑎᕤᕦꖴꗳⵙⵔⵙⵔⵙꗳꖴᕤᕦᑎᴥᗱᗴⵙ.update_layout(autosize=True,xaxis=dict(scaleanchor='y',scaleratio=1))
ⵙᗱᗴᴥᑎᕤᕦꖴꗳⵙⵔⵙⵔⵙꗳꖴᕤᕦᑎᴥᗱᗴⵙ.show()