Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: decrementing in matplotlib.pyplot and numpy

Mehodin GK:


import matplotlib.pyplot as plt
import numpy as np
import os
import sys
import time


MissionName = "Mars"
savename = "Mission"
start_time = time.time()
t = np.arange(0.0, 200.0, 10)
M0 = 2970000
mps = 12857.1429
mT = (mps * t)
m = (M0 - mT)
Fstuw = 35100000
a = Fstuw / m
for time in t:
if time >= 50:
vE = 0
for time in t:
if time vE = 2580
h1 = (vE * M0/mps)
h2 = (1-(m / M0))
h3 = (np.log(M0 / m) / np.log(2.718281828)) + 1
h = h1 * h2 * h3
v = vE * (np.log(M0 / m) / np.log(2.718281828))

plt.plot(t,v)
plt.xlabel('time (s)')
plt.ylabel('Velocity (m/s)')
plt.title('Model raketmissie ' + str(MissionName))
plt.grid(True)
plt.savefig(savename + ".png")
plt.show()

Okay so the problem i have is that it does not change vE to 0 when the time is bigger or equal to 50, the result i get is this:



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: decrementing in matplotlib.pyplot and numpy

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×