Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PhAI
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
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
Scientific Computing and Engineering Group
Teaching
PhAI
Commits
b8e107b1
Commit
b8e107b1
authored
7 years ago
by
JuanPi Carbajal
Browse files
Options
Downloads
Patches
Plain Diff
analytic solution
parent
80641a2a
Branches
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
PhysikfuerInfaormatik_PhAI/python/02_TeilA_Uebung_python.py
+5
-1
5 additions, 1 deletion
PhysikfuerInfaormatik_PhAI/python/02_TeilA_Uebung_python.py
with
5 additions
and
1 deletion
PhysikfuerInfaormatik_PhAI/python/02_TeilA_Uebung_python.py
+
5
−
1
View file @
b8e107b1
...
...
@@ -54,8 +54,12 @@ v = np.zeros(nt) # Speicherzuweisung für Geschwindigkeitarray
import
matplotlib.pyplot
as
plt
# Analytische Lösung
v_ana
=
lambda
t
:
a
*
t
plt
.
ion
()
# interaktives Plotten "on"
#plt.clf() # Diese Zeile auskommentieren, um den Plot zu leeren
plt
.
plot
(
t
,
v
,
'
.-
'
)
# Punkt-Dash-Plot der Funktion
plt
.
plot
(
t
,
v
,
'
.
'
)
# Punkt-Plot der numerische Lösung
plt
.
plot
(
t
,
v_ana
(
t
),
'
-
'
)
# Linien-Plot der analytische Lösung
plt
.
show
()
# Zeigt den Plot
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