0
I am doing a work, and in it I find a vector with possible values for a variable, however, the values that really meet the answer, are contained in the restriction 1.5 < R < 2
. How I would transform the vector R
complete in the vector R
real that meets the restriction? ie, the one that the house 0
begins with the value 1.5
.
Ex: 1.5 < V < 2
, whereas V
is a decreasing vector with 7 thousand houses.
Follow what I tried to do:
import numpy as np
import matplotlib.pyplot as plt
# Parametros Físicos:
m = 0.558 # massa (kg)
# Parâmetros Modais:
zeta = np.arange(0.000001,(np.sqrt(1/2)-0.001),0.0001) # fator amortecimento
# Força externa aplicada:
F0 = 200 # amplitude da força (N)
rpico = np.sqrt(1-2*zeta**2)
ZY = (rpico**2)/((1-rpico**2)**2 + (2*zeta*rpico)**2)**(1/2)
i = j = 0
while i < 7061:
i = i + 1
if ZY[i]>1.5 and ZY[i]<2:
zyl[j] = ZY[i]
j = j+1
plt.figure()
plt.plot(zeta,rpico)
plt.xlabel('Zeta')
plt.ylabel('rpico')
plt.title('-')
plt.grid (True)
plt.figure()
plt.plot(rpico,zyl)
plt.xlabel('rpico')
plt.ylabel('ZY')
plt.title('-')
plt.grid (True)