Bottom Page

• 0 Vote(s) - 0 Average
• 1
• 2
• 3
• 4
• 5
 Plotting of equations mudezda1 Unladen Swallow Posts: 3 Threads: 2 Joined: Feb 2019 Reputation: 0 Likes received: 0 #1 Feb-11-2019, 03:52 PM import numpy as np import matplotlib.pyplot as plt l= 1.5 m= 2.5 g= 9.81 d= 2.7 k= 9.08 angles = np.arange(360) / 180 * np.pi x = ((m * g)/(k * d)) * np.tan(angles) y = 1 - ((2 * l) / d) * np.sin(angles) plt.plot(x,y) plt.show() Im trying to plot these two equations but they wont come up, although if i plot eqution y by itself it does come up. My aim is to plot these two equations and note down where they meet. How could i do that? scidam Posts: 509 Threads: 1 Joined: Mar 2018 Reputation: 69 Likes received: 68 #2 Feb-13-2019, 07:26 AM This is likely because tan(90 deg) is infinity. You need to exclude pi/2 (90 deg) and 3pi/2 (270 deg) from angles array. It could be done by using arange with different step, e.g. `arange(0, 360, 0.3)` « Next Oldest | Next Newest »

Top Page

 Possibly Related Threads... Thread Author Replies Views Last Post résolution numérique pour les équations de Lockta-Volterra en python Mohamed19 2 124 Jul-07-2019, 01:26 PM Last Post: SheeppOSU Repeating equations Tbot100 2 169 May-29-2019, 02:38 AM Last Post: heiner55 Requesting help with 3D plotting with quivers Akan2019 1 146 May-15-2019, 07:46 AM Last Post: Akan2019 Coditional colormaps plotting Staph 5 294 May-13-2019, 12:09 PM Last Post: scidam plotting inside the loop is not working jenya56 4 261 Apr-10-2019, 08:11 PM Last Post: perfringo System of 3 non-linear equations in 3 unknowns (how-to-solve?) samsonite 2 256 Mar-23-2019, 10:14 AM Last Post: samsonite Plotting help! Time is of the essence lordhyperfluxed 6 360 Mar-22-2019, 12:50 PM Last Post: scidam basic plotting question Devilish 0 348 Dec-27-2018, 10:35 PM Last Post: Devilish Plotting datas Krszt 2 380 Oct-31-2018, 03:29 PM Last Post: Davis4109 problem in plotting intraday results using matplotlib mr_byte31 0 590 Aug-20-2018, 11:32 AM Last Post: mr_byte31

Forum Jump:

Users browsing this thread: 1 Guest(s)