Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

vectorized function

import numpy as np
import matplotlib.pyplot as plt
import math

def teo_function(d):
    return 2*math.pi*math.sqrt(((1**2)/(12+d**2))/9.81*d)
vecfunc = np.vectorize(teo_function)

d = np.arange(0.0, 100.0, 0.01)
T = vecfunc(d)
plt.plot (d, T, 'bo', d, T, 'k')
plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: python check if variable is module 
Python :: pytorch plot batch 
Python :: Matplotlib scatter plot custom point annotation 
Python :: create empty dataframe and concat 
Python :: Create multiple lists with defined shape filled with 0 
Python :: Donut chart graphing funciton 
Python :: how to access github folder in python code using github https link 
Python :: the requested url was not found on the server. flask 
Python :: python sliding window maximum 
Python :: some problem occurred shows payubiz 
Python :: how to choose a random key from a dictionary in python 
Python :: python dataframe update if not new row 
Python :: def dict(d) 
Python :: how to get a rectangular grid out of two given one-dimensional arrays 
Python :: how to add a separator in a menubar pyqt5 
Python :: adding attributes and metadata to a dataset using xarray 
Python :: if condition in djangio template 
Python :: créer un dict python avec une liste 
Python :: python exit while loop 
Python :: tkinter add new element into grid by click 
Python :: related name django 
Python :: FilePathField 
Python :: say hello to someone in python 
Python :: integer to boolean numpy 
Python :: devu and friendship testing codechef solution 
Python :: pandas save csv list as columns 
Python :: access host database django docker 
Python :: !python read data from mysql and export to xecel 
Python :: pandas use map lambda to fillna python 
Python :: Degrees conversion function in Python 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =