Created
February 23, 2018 04:34
-
-
Save tommyct614/a2a1c6f2f056090ba1bc17c726be01d7 to your computer and use it in GitHub Desktop.
code to generate sine values from 0 to pi/2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
x = np.linspace(0,np.pi/2, 100) | |
y = np.zeros(len(x)) | |
x1 = np.zeros(100) | |
for i in range(len(x)): | |
y[i] = np.sin(x[i]) | |
print(y) | |
np.savetxt("inputData.dat", np.c_[x,y], fmt = "%.3e") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment