尝试在signal.filtfilt()
行中准确输入以下包含import matplotlib.pyplot as plt
import pandas as pd
import readTrc
import numpy as np
from scipy.signal import argrelextrema
from scipy import signal
datX, datY, m = readTrc.readTrc('C220180104_ch2_UHF00014.trc')
srx, sry = pd.Series(datX * 1000), pd.Series(datY * 1000)
df = pd.concat([srx, sry], axis = 1)
df.set_index(0, inplace = True)
#Impulse location
x1 = df[1].idxmax() - 0.0005
x2 = df[1].idxmax() + 0.003
df2 = df.loc[x1:x2]
##with pd.option_context('display.max_rows', None, 'display.max_columns', None):
## print(df2)
#Locate Maximum
print('Maximum at:', round(df[1].idxmax(), 6), 'ms')
#Local Peaks
n=10 #Every n maximum a Point will be placed
df3_min = df2.iloc[argrelextrema(df2[1].values, np.less_equal, order=n)[0]][1]
df3_max = df2.iloc[argrelextrema(df2[1].values, np.greater_equal, order=n)[0]][1]
plt.scatter(df3_min.index, df3_min, c='orange')
plt.scatter(df3_max.index, df3_max, c='green')
o = 10 #Order of the filter
f = 0.99 #Critical frequency
btype = 'low' #lowpass, highpass, bandpass, bandstop
analog = False #False = Digital, True = Analog
output = 'ba' #ba/zpk numerator/polezero output
b, a = signal.butter(o, f, btype = btype, analog = analog, output = output)
y2 = signal.filtfilt(b,a, df3_max.values)
df3_max = pd.DataFrame(y2, index=df3_max.index)
#Plot filter
plt.plot(df3_max.index, df3_max, color = 'red')
#Plot Impulse
df2[1].plot(grid = 1,
linewidth = 1,
figsize = (9,5),
color = 'blue',
legend = False,
xlim = (x1, x2))
plt.xlabel('Zeit in ms')
plt.ylabel('UHF-Signal in mV')
##plt.savefig('UHF_plot.png', dpi = 600)
plt.show()
print('done')
个网址的数据。
14
通过7
并将每个URL作为矢量存储,并在google.com gmail.com
google.com maps.com
facebook.com ufl.edu
ufl.edu google.com
ufl.edu gmail.com
maps.com facebook.com
gmail.com maps.com
中仅打印这样的唯一矢量:
cin
到目前为止,我已经完成了以下代码,但未打印c++
。
1 google.com
2 gmail.com
3 facebook.com
4 maps.com
5 ufl.edu
答案 0 :(得分:1)
根据您的输入约束始终是固定的。输入共有7行,每行包含2个网址。因此,总的来说,我们必须扫描14个网址作为字符串。并且,为了查找唯一的字符串,我们可以使用@(
Html.Kendo().DropDownList()
.Name("Type")
.DataTextField("Text")
.DataValueField("Value")
.OptionLabel("---Select Partner---")
.HtmlAttributes(new { data_value_primitive = "true" })
.BindTo(ViewBag.TemporaryPartnersList)
.Value("1")
)
来存储url,并且只有在hashMap
中不存在的情况下,才能将url插入向量中。总体代码为:
hashMap