Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
chiffrageChaotique
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
koizel
chiffrageChaotique
Commits
46ca8ab5
Commit
46ca8ab5
authored
8 years ago
by
Gabriel Hondet
Browse files
Options
Downloads
Patches
Plain Diff
write_chua: pas en argument pour écrire le temps et non le numéro.
changé alpha en 10 pour éviter le hole-filling
parent
8c7f0d89
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
numerical_calc.py
+9
-4
9 additions, 4 deletions
numerical_calc.py
with
9 additions
and
4 deletions
numerical_calc.py
+
9
−
4
View file @
46ca8ab5
...
...
@@ -14,7 +14,7 @@ def main():
# Résolution
m0
,
m1
=
-
1
/
7
,
2
/
7
alpha
,
beta
=
9.85
,
14.3
alpha
,
beta
=
10
,
14.3
Y0
=
np
.
array
([.
7
,
0
,
0
])
y_full
=
odeint
(
Chua
,
Y0
,
t
,
args
=
(
alpha
,
beta
,
m0
,
m1
))
...
...
@@ -23,7 +23,7 @@ def main():
y
=
y_full
[
ttrans
:,
].
copy
()
# Ecriture
write_chua
(
y
)
write_chua
(
y
,
h
)
# Diagramme y_{n+1} = f(y_n)
poincare_val
=
poincare_map
(
y
)
...
...
@@ -117,12 +117,17 @@ def write_dots_pgfplots(diag, name):
f
.
write
(
"
{},{}
\n
"
.
format
(
elt
[
0
],
elt
[
1
]))
def
write_chua
(
points
):
def
write_chua
(
points
,
h
):
"""
\'
Ecris les coordonnées dans un fichier pour pgfplot. h pour avoir le temps
et non le numéro de point
"""
N
=
points
.
shape
[
0
]
with
open
(
'
chua.csv
'
,
'
w
'
)
as
f
:
f
.
write
(
"
a,b,c,d
\n
"
)
for
i
in
range
(
N
):
f
.
write
(
"
{},{},{},{}
\n
"
.
format
(
i
,
points
[
i
,
0
],
points
[
i
,
1
],
it
=
i
*
h
f
.
write
(
"
{},{},{},{}
\n
"
.
format
(
it
,
points
[
i
,
0
],
points
[
i
,
1
],
points
[
i
,
2
]))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment